Win7X64, CB is latest nightly.
Steps to reproduce:
I have a wxPanel embedded in wxFlexGrid sizer of another wxPanel.
The embedded wxPanel has a wxBoxSizer and StaticText in it. Code is below:
<object class="sizeritem">
<object class="wxPanel" name="wxID_ANY" variable="Panel3" member="no">
<size>100,100</size>
<bg>wxSYS_COLOUR_ACTIVECAPTION</bg>
<object class="wxBoxSizer" variable="BoxSizer3" member="no">
<object class="sizeritem">
<object class="wxStaticText" name="wxID_ANY" variable="StaticText7" member="no">
<label>Log</label>
</object>
<flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
<border>5</border>
<option>1</option>
</object>
</object>
</object>
<flag>wxALL|wxEXPAND</flag>
<border>5</border>
<option>1</option>
</object>
1. Change the size of the wxPanel above instead of default.
2. The code is generated as below
Panel3->SetSizer(BoxSizer3);
SetSizer(BoxSizer3);
Layout();
However, it should be correct if you set the size of wxPanel to default. that is,
Panel3->SetSizer(BoxSizer3);
BoxSizer3->Fit(Panel3);
BoxSizer3->SetSizeHints(Panel3);
I can confirm this bug exists.
Code::Blocks 17.12
My case is more complex: SplitterWindow contains Notebook. The top sizers of notebook panels that are set to not default size are used for wxForm::SetSizer() calls.
Hi, Can you please check if the issue is still occurring in Code::Blocks 20.03 and post here if it is fixed or not. The CB 20.03 download page is https://www.codeblocks.org/downloads/binaries/.
If you are using Windows 64 bit and 20.03 and the issue is still occurring you could try the latest nightly and post here if the issue occurs or not in the nightly, which can be found in the following CB forum https://forums.codeblocks.org/index.php/board,20.0.html .
Sorry. I have moved on and am not using Code::Blocks at all. I have forgotten which project this was and I don't even understand the report. To do a retest at this point would be a day or so of work.
There was a recent change how sizers are handled in wxSmith. Probably this has fixed it. If it is still relevant please post exact steps to reproduce and I'll reopen it.