This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
-
shawnhcorey
- Knows some wx things

- Posts: 34
- Joined: Mon Nov 19, 2012 3:29 pm
- Location: The Great White North
Post
by shawnhcorey » Thu Sep 11, 2014 6:11 pm
I am trying to build something like this:
Code: Select all
AppNBPage : wxPanel
wxSplitterWindow
wxTreeCtrl
wxGrid
AppMainWin : wxFrame
AppMainPanel : wxPanel
wxBoxSizer
AppMenuBar : wxMenuBar
AppToolBar : wxToolBar
AppSttusBar : wxStatusBar
AppNB : wxAUINotebook
AppNBPage
...
1. wxFormBuilder won't let me put a wxBoxSizer in a wxPanel. It insists that the wxSizer goes in the wxFrame.
2. It won't let me put a wxSplitterWindow in a wxPanel or a wxAUINotebook.
What am I doing wrong?
-
DavidHart
- Site Admin

- Posts: 3907
- Joined: Thu Jan 12, 2006 6:23 pm
- Location: IoW, UK
Post
by DavidHart » Thu Sep 11, 2014 6:25 pm
Hi,
Unless it's been fixed recently (I've not used it for a couple of years) wxFB stupidly won't let you put a control such as a panel directly into a frame; it insists on frame > sizer > panel. I suspect that's what it's complaining about here.
Regards,
David
-
shawnhcorey
- Knows some wx things

- Posts: 34
- Joined: Mon Nov 19, 2012 3:29 pm
- Location: The Great White North
Post
by shawnhcorey » Thu Sep 11, 2014 6:47 pm
In other words, wxFormBuilder is not a very good guide.

-
DavidHart
- Site Admin

- Posts: 3907
- Joined: Thu Jan 12, 2006 6:23 pm
- Location: IoW, UK
Post
by DavidHart » Thu Sep 11, 2014 8:09 pm
In other words, wxFormBuilder is not a very good guide
It's second-best IMO (I now use wxCrafter).
However it's easy in wxFB to add a sizer to the frame, and put the panel into it. It does no harm, it's just not needed.
-
New Pagodi
- Super wx Problem Solver

- Posts: 313
- Joined: Tue Jun 20, 2006 6:47 pm
-
Contact:
Post
by New Pagodi » Fri Sep 12, 2014 2:44 am
I love formbuilder, but I suppose it can be a bit picky about what it allows to be a child of certain controls.
I think the only children in allows for notebook pages are panels. So you'll need to add a panel to serve as the page and then add the splitter as a child of that panel.
Incidentally, if the notebook is expanded and stretched and has no border, you could add it directly to the frame's sizer (bSizer1 in the picture above) and skip the application panel (m_panel1 in the picture above).
-
shawnhcorey
- Knows some wx things

- Posts: 34
- Joined: Mon Nov 19, 2012 3:29 pm
- Location: The Great White North
Post
by shawnhcorey » Fri Sep 12, 2014 11:46 am
New Pagodi wrote:I love formbuilder, but I suppose it can be a bit picky about what it allows to be a child of certain controls.
Thanks. Though that seems to be a lot of sizers and panels.

-
buttonsrtoys
- Knows some wx things

- Posts: 45
- Joined: Mon Jul 03, 2017 12:03 am
Post
by buttonsrtoys » Sat Feb 03, 2018 1:57 am
This is an old thread but I'm trying and failing to replicate part of it in wxFB. Specifically, adding a panel to a BoxSizer like shown above:

- CaptureWxFB2.JPG (23.37 KiB) Viewed 1806 times
But wxFB won't let me add a panel to a BoxSizer. It puts it at the same level as the Frame as shown below:

- CaptureWxFB.JPG (23.55 KiB) Viewed 1806 times
Is there settings or something I need to add to the BoxSizer before it will receive a panel?
-
New Pagodi
- Super wx Problem Solver

- Posts: 313
- Joined: Tue Jun 20, 2006 6:47 pm
-
Contact:
Post
by New Pagodi » Sat Feb 03, 2018 2:02 am
buttonsrtoys wrote:But wxFB won't let me add a panel to a BoxSizer. It puts it at the same level as the Frame as shown below:
CaptureWxFB.JPG
Is there settings or something I need to add to the BoxSizer before it will receive a panel?
Use the wxPanel item under the "Containers" tab.
You're trying the an a Panel item from the "Forms" tab. The items on that tab are meant to be top level windows and can not be children of any other windows.
-
hpkkumar007
- In need of some credit

- Posts: 1
- Joined: Wed May 02, 2018 8:55 am
Post
by hpkkumar007 » Wed May 02, 2018 9:02 am
New Pagodi wrote:buttonsrtoys wrote:But wxFB won't let me add a panel to a BoxSizer. It puts it at the same level as the Frame as shown below:
CaptureWxFB.JPG
Is there settings or something I need to add to the BoxSizer before it will receive a panel?
Use the wxPanel item under the "Containers" tab.
You're trying the an a Panel item from the "Forms" tab. The items on that tab are meant to be top level windows and can not be children of any other windows.
wxPanel item under the "Containers" tab worked, searched for this solution from few days..
many thanks..
