Window doesn't show child widgets

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
In need of some credit
In need of some credit
Posts: 1
Joined: Tue May 05, 2020 12:53 am

Window doesn't show child widgets

Post by cargotruck » Tue May 05, 2020 3:03 am

When this code is the sizers are larger than the window's display area. I must manually adjust the size of the window in order to see all the widgets inside. I'd like help for getting the window to be large enough to display all the widgets when the window is created.

I've attempted to include the code, but the bulletin board is blocking my post when I try, considering it spam.

Code: Select all

void Main_win::display_config()
	//configure sizers
	sizer_master = new wxBoxSizer(wxHORIZONTAL);
	sizer_v1 = new wxBoxSizer(wxHORIZONTAL);
	sizer_v2 = new wxBoxSizer(wxHORIZONTAL);
	sizer_v3 = new wxBoxSizer(wxHORIZONTAL);
	sizer_v4 = new wxBoxSizer(wxHORIZONTAL);
	//...controls are defined here
	sizer_v1->Add(lbl_rnds,0,wxEXPAND | wxALL,5);
	sizer_v1->Add(btn_edit_rnds,0,wxEXPAND | wxALL,5);
	//...continue adding controls to sizers as above...
	sizer_master->Add(sizer_v1,1,wxEXpAND | wxALL,5);
	//...continue adding sizers to sizer_master as above...
Last edited by cargotruck on Wed May 06, 2020 1:44 pm, edited 1 time in total.

Posts: 1594
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Re: Window doesn't show child widgets

Post by catalin » Tue May 05, 2020 4:09 am

Try to avoid links and include some minimal code in the post (see the code tags too).

User avatar
Posts: 1198
Joined: Sat Oct 23, 2004 9:58 am
Location: Zaporizhzhya, Ukraine

Re: Window doesn't show child widgets

Post by T-Rex » Wed May 06, 2020 1:53 pm

What does this method return before you call Fit() and what is the client size after you call Fit()? Can it me so that actual minimal size is smaller than default window's size?

Post Reply