resizing a hidden child Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
nkwinder
Experienced Solver
Experienced Solver
Posts: 70
Joined: Sun Nov 23, 2008 2:32 pm

resizing a hidden child

Post by nkwinder » Tue Feb 10, 2009 12:47 am

hello

i have a frame, with a child notebook. Child is initially hidden, and it is created with initial size of the parent. If the user resize the frame, while the notebook is still hidden (because user didn't add any page), then when a page is added, the notebook size haven't changed, to fit the parent. Only when the user resizes the parent with the notebook shown, notebook fits the parent size.

So i thought that Show(false) only had to do with visibility, and not with the functionality in such a way.

Any workaround? (except from having to resize it manually to fit the parent, each time i show it :) )

Thanks in advance

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria » Tue Feb 10, 2009 1:38 am

You could maybe simply call ->Layout() after making the component visible

nkwinder
Experienced Solver
Experienced Solver
Posts: 70
Joined: Sun Nov 23, 2008 2:32 pm

Post by nkwinder » Tue Feb 10, 2009 2:36 am

didn't do anything...

i finally called notebook->SetSize(GetClientSize());

but this thread is more like to show the behavior of show(hide).

Post Reply