Fix horizontal scrollbar handling for wxCheckListBox in wxMSW
The scrollbar wasn't shown when the control became only slightly more narrow than its contents, resulting in truncation of the rightmost part of the strings shown in it. Fix this by accounting for the check box explicitly in wxListBox SetHorizontalExtent() method using the new MSWGetFullItemSize() helper which is also used to avoid code duplication between wxCheckListBox MSWOnMeasure() and DoGetBestClientSize() methods. Closes #18377.
This commit is contained in:
@@ -65,6 +65,8 @@ public:
|
||||
virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item) wxOVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual wxSize MSWGetFullItemSize(int w, int h) const wxOVERRIDE;
|
||||
|
||||
// pressing space or clicking the check box toggles the item
|
||||
void OnKeyDown(wxKeyEvent& event);
|
||||
void OnLeftClick(wxMouseEvent& event);
|
||||
|
Reference in New Issue
Block a user