Fix retrieving the size of item label in native MSW wxListCtrl
Closes https://github.com/wxWidgets/wxWidgets/pull/1461 Closes #11355.
This commit is contained in:
committed by
Vadim Zeitlin
parent
32d8b5954a
commit
da524ebacb
@@ -1241,6 +1241,16 @@ bool wxListCtrl::GetSubItemRect(long item, long subItem, wxRect& rect, int code)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if( code == wxLIST_RECT_LABEL )
|
||||
{
|
||||
RECT rectIcon;
|
||||
rectIcon.top = subItem;
|
||||
rectIcon.left = LVIR_ICON;
|
||||
if( !( ::SendMessageA(GetHwnd(), LVM_GETSUBITEMRECT, item, (LPARAM)&rectIcon) ) )
|
||||
return false;
|
||||
else
|
||||
rectWin.left = rectIcon.right;
|
||||
}
|
||||
|
||||
wxCopyRECTToRect(rectWin, rect);
|
||||
|
||||
|
Reference in New Issue
Block a user