Bug with hidden widgets on window creation/show
Bug with hidden widgets on window creation/show
If a widget is hidden when the window is shown/created, showing this widget afterwards seems to stick it at the top level of the window, even if it's supposed to be in a (different?) sizer. Calling Layout () on my window doesn't change it. Is this behaviour expected?
Re: Bug with hidden widgets on window creation/show
Does the window "snap" to the right position when you resize the window? If yes, calling Layout() should fix it. If calling Layout on the frame doesn't help, try calling it on the topmost sizer.
If that doesn't help, please show some code, ideally a minimal, compilable sample that shows the problem.
If that doesn't help, please show some code, ideally a minimal, compilable sample that shows the problem.
Use the source, Luke!
Re: Bug with hidden widgets on window creation/show
Calling topmost_sizer->Layout () solves the problem with hidden widgets being placed in the wrong sizer, thanks very much for that tip.
In another instance, in windows my widgets are taking only the top left 32 pixels of their tab page. Resizing the window "snaps" everything back into place, but calling Layout () on the window itself, and on various sizers/panels/etc. doesn't help. This works fine on linux and osx.
In another instance, in windows my widgets are taking only the top left 32 pixels of their tab page. Resizing the window "snaps" everything back into place, but calling Layout () on the window itself, and on various sizers/panels/etc. doesn't help. This works fine on linux and osx.
Re: Bug with hidden widgets on window creation/show
(Note to self) Just spent half an hour futzing around with a similar case, it turns out an extra call to Layout () on a sizer was causing the same problem.
Sorry for bumping this thread, just got it from google search results searching for this issue (again). Adding this for documentation purposes.
Sorry for bumping this thread, just got it from google search results searching for this issue (again). Adding this for documentation purposes.