Sizers and resizing the main frame question
Posted: Thu Mar 21, 2019 9:47 pm
There's something odd I've noticed a few times, and I suspect I'm doing something wrong with sizers to cause it.
I'll create a frame, fill it with controls using sizers, and everything will lay out fine.
Until I resize the frame, even if just a little. Suddenly controls will jump out past the "edge" of the frame (requiring scrollbars on the main frame, or expanding the main frame considerably more to see it). These are obviously controls placed with the "wxExpand" flag, but I don't understand why they'll lay out and fit within the frame, then a resize event will somehow massively alter their size, extending them past the frame's edge.
I unfortunately don't have a simple code example I can give, but I'm hoping the problem is based on a person misunderstanding of sizers or the way wxWidgets handles resizing the main frame.
I'll create a frame, fill it with controls using sizers, and everything will lay out fine.
Until I resize the frame, even if just a little. Suddenly controls will jump out past the "edge" of the frame (requiring scrollbars on the main frame, or expanding the main frame considerably more to see it). These are obviously controls placed with the "wxExpand" flag, but I don't understand why they'll lay out and fit within the frame, then a resize event will somehow massively alter their size, extending them past the frame's edge.
I unfortunately don't have a simple code example I can give, but I'm hoping the problem is based on a person misunderstanding of sizers or the way wxWidgets handles resizing the main frame.