Add DoGetBestSize to wxCheckListBox that adds room for the checkbox
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -88,6 +88,8 @@ protected:
|
|||||||
void OnKeyDown(wxKeyEvent& event);
|
void OnKeyDown(wxKeyEvent& event);
|
||||||
void OnLeftClick(wxMouseEvent& event);
|
void OnLeftClick(wxMouseEvent& event);
|
||||||
|
|
||||||
|
wxSize DoGetBestSize() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
size_t m_nItemHeight; // height of checklistbox items (the same for all)
|
size_t m_nItemHeight; // height of checklistbox items (the same for all)
|
||||||
|
|
||||||
|
@@ -547,5 +547,13 @@ int wxCheckListBox::DoHitTestItem(wxCoord x, wxCoord y) const
|
|||||||
return nItem >= m_noItems ? wxNOT_FOUND : nItem;
|
return nItem >= m_noItems ? wxNOT_FOUND : nItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
wxSize wxCheckListBox::DoGetBestSize() const
|
||||||
|
{
|
||||||
|
wxSize best = wxListBox::DoGetBestSize();
|
||||||
|
best.x += wxOwnerDrawn::GetDefaultMarginWidth(); // add room for the checkbox
|
||||||
|
return best;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user