DialogFormSmith::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);
//*)
}
DialogFormBuilder::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 );
}
DialogFormGlade::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
}
case wxsCPP:
{
AddHeader(_T("<wx/sizer.h>"),GetInfo().ClassName,hfInPCH);
AddHeader(_T("<wx/statbox.h>"),GetInfo().ClassName,hfInPCH);
Codef(_T("%C(%s, %W, %t);\n"),
(Orient!=wxHORIZONTAL)?_T("wxVERTICAL"):_T("wxHORIZONTAL"),
Label.wx_str());
Codef(_T("wxStaticBox *SB_%s = %s->GetStaticBox();\n"),GetVarName().wx_str(),GetVarName().wx_str());
return;
}
case wxsCPP:
{
AddHeader(_T("<wx/sizer.h>"),GetInfo().ClassName,hfInPCH);
AddHeader(_T("<wx/statbox.h>"),GetInfo().ClassName,hfInPCH);
Codef(_T("%C(%s, %W, %t);\n"),
(Orient == wxHORIZONTAL) ? _T("wxHORIZONTAL") : _T("wxVERTICAL"),
Label.wx_str());
Codef(_T("wxStaticBox *SB_%s = %s->GetStaticBox();\n"),GetVarName().wx_str(),GetVarName().wx_str());
return;
} if (GetInfo().ClassName == "wxStaticBoxSizer")
{
// Use the static box as parent, as required by wxWidgets since 2.9.1
wxsCoderContext* context = GetCoderContext();
const wxString saveParent(context->m_WindowParent);
context->m_WindowParent = "SB_" + GetVarName();
Child->BuildCode(context);
context->m_WindowParent = saveParent;
}
else
{
// Using same parent as we got, sizer is not a parent window
Child->BuildCode(GetCoderContext());
}Fixed in r13767 (https://sourceforge.net/p/codeblocks/code/13767/).