Ticket #11497 (closed defect: fixed)
SetMaxSize not limiting the size of controls in sizer
| Reported by: | Boksha | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | GUI-all | Version: | 2.9.0 |
| Keywords: | wxSizer wxBoxSizer wxButton regression | Cc: | joshtp |
| Blocked By: | Patch: | no | |
| Blocking: | 14498 |
Description
It appears the SetMaxSize function might have been broken in 2.9.0. If the function is called for a control in a sizer, the sizer will still resize the control above the set size, regardless of whether it's the only control in the sizer and regardless of whether the sizer is applied to a top level window or a child like wxPanel.
Included should be a patch to samples/minimal that shows the problem (apply from within folder with -p1). If compiled with any 2.8 version (checked for wxGTK and wxMac), the button stops becoming larger when the window is resized to above the max size, which is what I'd expect to happen. If compiled with 2.9.0 (checked for wxGTK and wxMSW), the button will always take up the entire window.

