Code::Blocks Forums
User forums => General (but related to Code::Blocks) => Topic started by: Aaron on March 16, 2015, 08:02:41 pm
-
I have added a wxPanel to a project with a wxFrame. (not quite like Layers in PhotoShop CS though)
As I've read, the controls should be placed on the wxPanel. So I added a couple controls.
When built & run only the empty wxFrame is displayed however.
I'm missing a step here, how does the wxPanel take precedence over the frame?
Should it become a 'Skin' of the frame?
Should I be able to use a wxPanel without a frame?
(http://www.buy-fla.com/panel.PNG)
-
Read about sizers in the wxWidgets documentation. They are a bit hard at the beginning, but when you get used to then it is relatively easy to use them. And they solve lots of layout issues automagically.
-
Must the sizer be manually-coded or is it a layout attribute I'm overlooking?
I have not found any menu items for sizer.
I've heard if the panel is the only child of a wxFrame, then when the frame is sized the panel will automatically be sized also to fill all of the client area of the frame.
If this is a common usage of panel and frame, its surprising that instructions and examples are so scarce.
-
You can add them from the toolbar with all the other controls in wxSmith.
-
So I see.
That was easy.
Thanks ObFusCATed