How to make buttons visible at runtime 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
msdobrescu
Knows some wx things
Knows some wx things
Posts: 35
Joined: Wed Sep 08, 2004 6:22 am

How to make buttons visible at runtime

Post by msdobrescu » Wed Dec 30, 2009 10:40 pm

Hello,

I have a flex grid sizer in a panel on a frame.
It contains a gauge and 2 buttons.
The gauge expands occupying the available space left.
The order of the controls is gauge, button, button.
I have them invisible at the frame's opening.
I make them visible using a menu at run-time.
The gauge is displayed always.
The buttons align to the left, despite I set them to be to the right, so they appear in the wrong place.
I use code::blocks with wxSmith to design the frame (where all the controls are in the right place at design time).
I use wxWidgets 2.9.0.
If I re-size the frame at run-time, with the mouse, the buttons appear/move in the right place.

Any idea what should I do to fix this?

Thanks!

DavidHart
Site Admin
Site Admin
Posts: 3906
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Post by DavidHart » Wed Dec 30, 2009 10:56 pm

Hi,

That sort of thing can usually be cured by doing:
pSizer->Layout();

Regards,

David

msdobrescu
Knows some wx things
Knows some wx things
Posts: 35
Joined: Wed Sep 08, 2004 6:22 am

Post by msdobrescu » Thu Dec 31, 2009 6:05 am

DavidHart wrote:Hi,

That sort of thing can usually be cured by doing:
pSizer->Layout();

Regards,

David
That worked indeed, thanks!

Post Reply