mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-25 17:15:45 +08:00
Improve HitTest in generic wxListCtrl
Detect when a checkbox is hit and return wxLIST_HITTEST_ONITEMSTATEICON. Determine the correct location of the icon, it might be preceded by a checkbox. Return only the icon rectangle in GetSubItemRect with wxLIST_RECT_ICON, not the padding or margins above/below the icon. Closes #25764.
This commit is contained in:
committed by
Vadim Zeitlin
parent
18711b55ba
commit
29c30d5917
@@ -1491,6 +1491,7 @@ void MyListCtrl::OnRightClick(wxMouseEvent& event)
|
||||
case wxLIST_HITTEST_NOWHERE: where = "nowhere near"; break;
|
||||
case wxLIST_HITTEST_ONITEMICON: where = "on icon of"; break;
|
||||
case wxLIST_HITTEST_ONITEMLABEL: where = "on label of"; break;
|
||||
case wxLIST_HITTEST_ONITEMSTATEICON: where = "on checkbox of"; break;
|
||||
case wxLIST_HITTEST_TOLEFT: where = "to the left of"; break;
|
||||
case wxLIST_HITTEST_TORIGHT: where = "to the right of"; break;
|
||||
default: where = "not clear exactly where on"; break;
|
||||
|
||||
Reference in New Issue
Block a user