Any help would be much appreciated.
windows 10
wxwidgets 3.1.4
visual studio community 2019
version 16.1.3
Code: Select all
cTestStaticTextFrame::cTestStaticTextFrame(wxMDIParentFrame* parent, wxString name)
: wxMDIChildFrame(parent, wxID_ANY, name)
{
this->SetBackgroundColour(wxColour("#ededed")) ;
this->SetInitialSize(wxSize(300, 190)) ;
wxBoxSizer* vbox = new wxBoxSizer(wxVERTICAL) ;
this->SetSizer(vbox) ;
wxFlexGridSizer* fgs = new wxFlexGridSizer(3, 2, 0, 0) ;
fgs->AddGrowableCol(1, 1) ;
wxStaticText* name_label = new wxStaticText(this, wxID_ANY, wxString("Name")) ;
wxTextCtrl* name_input = new wxTextCtrl(this, wxID_ANY, wxString("")) ;
fgs->Add(name_label, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5) ;
fgs->Add(name_input, 1, wxEXPAND|wxALL, 5) ;
wxStaticText* description_label = new wxStaticText(this, wxID_ANY, wxString("Description")) ;
wxTextCtrl* description_input = new wxTextCtrl(this, wxID_ANY, wxString("")) ;
fgs->Add(description_label, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5) ;
fgs->Add(description_input, 1, wxEXPAND|wxALL, 5) ;
wxStaticText* active_label = new wxStaticText(this, wxID_ANY, wxString("Active")) ;
wxCheckBox* active_checkbox = new wxCheckBox(this, wxID_ANY, wxString("")) ;
fgs->Add(active_label, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5) ;
fgs->Add(active_checkbox, 1, wxEXPAND|wxALL, 5) ;
wxBoxSizer* hbox_btns = new wxBoxSizer(wxHORIZONTAL) ;
wxButton* help_button = new wxButton(this, 10001, wxString("Help")) ;
wxButton* ok_button = new wxButton(this, 10003, "Ok") ;
wxButton* cancel_button = new wxButton(this, 10002, wxString("Cancel")) ;
hbox_btns->Add(help_button, 0, wxALIGN_LEFT, 10) ;
hbox_btns->AddStretchSpacer(1) ;
hbox_btns->Add(ok_button, 0, wxALIGN_RIGHT, 10) ;
hbox_btns->Add(cancel_button, 0, wxALIGN_RIGHT, 10) ;
vbox->Add(fgs, 1, wxTOP|wxLEFT|wxRIGHT|wxEXPAND|wxALL, 10) ;
vbox->Add(hbox_btns, 1, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 10) ;
}