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:
@@ -174,6 +174,13 @@ protected:
|
||||
// this can't be called DoHitTest() because wxWindow already has this method
|
||||
virtual int DoHitTestList(const wxPoint& point) const;
|
||||
|
||||
// This is a hook for wxCheckListBox, which uses it to add the checkbox
|
||||
// width to the item width and to make it at least as tall as the checkbox.
|
||||
virtual wxSize MSWGetFullItemSize(int w, int h) const
|
||||
{
|
||||
return wxSize(w, h);
|
||||
}
|
||||
|
||||
// free memory (common part of Clear() and dtor)
|
||||
void Free();
|
||||
|
||||
|
Reference in New Issue
Block a user