1
Development / Re: wxSmith use bad constructor for wxStaticBoxSizer
« Last post by Miguel Gimenez on Today at 10:33:01 am »Spam reported to moderator.
As usual while waiting for the next release - don't forget to check the nightly builds in the forum.
The documentation hot games say that the child of a wxStaticBoxSizer should be the wxBoxSizer and not the owner of the wxStaticBoxSizer.
On Linux, for example, I can see the following warning on the console:
Element wxStaticText of wxStaticBoxSizer should be created as child of its wxStaticBox and not of wDialog.
I test several builder on a very simple case: a dialog window with a wxStaticBoxSizer that contain a wxStaticText and a wxTextCtrl.
With wxSmith:QuoteDialogFormSmith::DialogFormSmith(wxWindow* parent,wxWindowID id)
{
//(*Initialize(DialogFormSmith)
wxStaticBoxSizer* StaticBoxSizer1;
Create(parent, id, _("Test with wxSmith"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("id"));
StaticBoxSizer1 = new wxStaticBoxSizer(wxHORIZONTAL, this, _("StaticBoxSizer"));
StaticText1 = new wxStaticText(this, wxID_ANY, _("Label"), wxDefaultPosition, wxDefaultSize, 0);
StaticBoxSizer1->Add(StaticText1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
TextCtrl1 = new wxTextCtrl(this, wxID_ANY, _("Text"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
StaticBoxSizer1->Add(TextCtrl1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
SetSizer(StaticBoxSizer1);
StaticBoxSizer1->SetSizeHints(this);
//*)
}
with wxFormBuilder:QuoteDialogFormBuilder::DialogFormBuilder( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxStaticBoxSizer* sbSizer1;
sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("StaticBoxSizer") ), wxHORIZONTAL );
m_staticText1 = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText1->Wrap( -1 );
sbSizer1->Add( m_staticText1, 0, wxALL, 5 );
m_textCtrl1 = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
sbSizer1->Add( m_textCtrl1, 0, wxALL, 5 );
this->SetSizer( sbSizer1 );
this->Layout();
sbSizer1->Fit( this );
this->Centre( wxBOTH );
}
With wxGlade:QuoteDialogFormGlade::DialogFormGlade(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style):
wxDialog(parent, id, title, pos, size, wxDEFAULT_DIALOG_STYLE)
{
// begin wxGlade: DialogFormGlade::DialogFormGlade
SetTitle(wxT("Test with wxGlade"));
wxStaticBoxSizer* sizer_1 = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, wxT("StaticBoxSizer")), wxHORIZONTAL);
wxStaticText* label_1 = new wxStaticText(sizer_1->GetStaticBox(), wxID_ANY, wxT("Label"));
sizer_1->Add(label_1, 0, 0, 0);
text_ctrl_1 = new wxTextCtrl(sizer_1->GetStaticBox(), wxID_ANY, wxEmptyString);
sizer_1->Add(text_ctrl_1, 0, 0, 0);
SetSizer(sizer_1);
sizer_1->Fit(this);
Layout();
// end wxGlade
}
The codes generated by wxFormBuilder and wxGlade are good: no warning.
I join a complete project for testing
[Main Instruction]I've found that deleting the .conf file just one time solved this for me.
A debugging check in this application has failed.
Pecan, trying to re-customize my default.conf I think I found the root cause of the issue and so a quick way to fix it. The root cause of the debugging checks is a specific setting
Settings->Environment Settings->Notebooks Appearance->Tab Style
If you set the tab style to Firefox2 or Microsoft Visual Studio 7.1 the debugging checks are raised
Uisng default or Simple Tabs no debugging checks are raised.
So to me is enough to change my old settings from Firefox 2 to default to get a working default.conf (my old one). I hope this helps to understand how to fix the issue.
chmod +x ./CodeBlocks-r13865-x86_64.AppImage
./CodeBlocks-r13865-x86_64.AppImage
chmod +x CodeBlocks-v25.03-x86_64.AppImage
./CodeBlocks-v25.03-x86_64.AppImage