- wxRowColSizer *listBoxSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS);
- listBoxSizer->AddSizerChild(listBox);
- listBoxSizer->SetName(_T("listBoxSizer"));
-
- // Create constraints for the text sizer
- wxLayoutConstraints *textC = new wxLayoutConstraints;
- textC->left.SameAs (messageSizer, wxLeft);
- textC->top.Below (spacingSizer);
- listBoxSizer->SetConstraints(textC);
-
- // Insert another spacer
- wxSpacingSizer *spacingSizer2 = new wxSpacingSizer(topSizer, wxBelow, listBoxSizer, 10);
- spacingSizer->SetName(_T("spacingSizer2"));
-
- // Insert a sizer for the buttons
- wxRowColSizer *buttonSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS);
- buttonSizer->SetName(_T("buttonSizer"));
- buttonSizer->SetSpacing(12,0);
-
- // Specify constraints for the button sizer
- wxLayoutConstraints *c = new wxLayoutConstraints;
- c->width.AsIs ();
- c->height.AsIs ();
- c->top.Below (spacingSizer2);
- c->centreX.SameAs (listBoxSizer, wxCentreX);
- buttonSizer->SetConstraints(c);
-
- wxButton *ok = NULL;
- wxButton *cancel = NULL;
-
- if (style & wxOK) {
- ok = new wxButton(this, wxID_OK, _("OK"), wxDefaultPosition, wxSize(75,-1) );
- buttonSizer->AddSizerChild(ok);
- }