Hello!
I am working with Code::Blocks 16.01 and wxWidgets 3.0.
Of late, I am facing an issue which is for me difficult to understand.
I have a program with a pretty complexframe with right in its middle a panel which size is fixed to 540 x 540.
This program compiles, links, and runs without any error, warning, or problem.
For some reason, I have decided to change the panel size to 360 x 360 (there is no issue with its content...).
After performing this modification with the wxSmith RAD, the project rebuilds without any error or warning.
Alas, I now get an execution error!
Worse, if I back-correct the panel size to 540 x 540, and obviously rebuild the project, I STILL have an execution error
Bad luck!
Now, it happens that the initial and back-corrected sections of the code are NOT identical:
......
AllMaskedButton = new wxButton(HidePanel, ID_BUTTON11, _("Tous"), wxPoint(25,50), wxSize(50,25), 0, wxDefaultValidator, _T("ID_BUTTON11"));
BoxSizer3->Add(AllMaskedButton, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
HidePanel->SetSizer(BoxSizer3);
SetSizer(BoxSizer3); <- THESE 2 LINES ARE NOT PRESENT IN THE INITIAL FILE
Layout(); <- THESE 2 LINES ARE NOT PRESENT IN THE INITIAL FILE
BoxSizer2->Add(HidePanel, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
BoxSizer4 = new wxBoxSizer(wxHORIZONTAL);
Slate = new wxPanel(Panel1, ID_PANEL2, wxDefaultPosition, wxSize(540,540), wxDOUBLE_BORDER|wxTAB_TRAVERSAL, _T("ID_PANEL2"));
BoxSizer4->Add(Slate, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
........
Two strange new lines appear in the main file!
Commenting off these lines solves the issue! Miraculously, the program runs again!
There are no meaningful differences between the corresponding .wxs files.
Now to some questions:
- Is this behaviour understood?
- Is this due, maybe, to a faulty frame structure?
- Are they some warnings relative to it (in some documentation, I mean...)
Regards!