- const int iconSize = icon.GetWidth();
-
- c = new wxLayoutConstraints;
- c->top.SameAs(this, wxTop, 2*LAYOUT_Y_MARGIN);
- c->left.RightOf(bmp, 2*LAYOUT_X_MARGIN);
- c->right.SameAs(this, wxRight, 2*LAYOUT_X_MARGIN);
- c->height.Absolute(2*text->GetSize().GetHeight());
- text->SetConstraints(c);
-
- c = new wxLayoutConstraints;
- c->centreY.SameAs(text, wxCentreY);
- c->left.SameAs(this, wxLeft, 2*LAYOUT_X_MARGIN);
- c->width.Absolute(iconSize);
- c->height.Absolute(iconSize);
- bmp->SetConstraints(c);
-
- c = new wxLayoutConstraints;
- c->bottom.SameAs(this, wxBottom, 2*LAYOUT_X_MARGIN);
- c->right.SameAs(this, wxRight, 2*LAYOUT_X_MARGIN);
- c->width.Absolute(sizeBtn.GetWidth());
- c->height.Absolute(sizeBtn.GetHeight());
- btnClose->SetConstraints(c);
-
- c = new wxLayoutConstraints;
- c->bottom.SameAs(this, wxBottom, 2*LAYOUT_X_MARGIN);
- c->right.LeftOf(btnClose, 2*LAYOUT_X_MARGIN);
- c->width.Absolute(sizeBtn.GetWidth());
- c->height.Absolute(sizeBtn.GetHeight());
- btnNext->SetConstraints(c);
-
- c = new wxLayoutConstraints;
- c->bottom.SameAs(this, wxBottom, 2*LAYOUT_X_MARGIN);
- c->left.SameAs(this, wxLeft, 2*LAYOUT_X_MARGIN);
- c->width.AsIs();
- c->height.AsIs();
- m_checkbox->SetConstraints(c);
- m_checkbox->SetValue(showAtStartup);
+ // 2) put them in boxes
+
+ wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer *icon_text = new wxBoxSizer( wxHORIZONTAL );
+ icon_text->Add( bmp, 0, wxCENTER );
+ icon_text->Add( text, 1, wxCENTER | wxLEFT, 20 );
+ topsizer->Add( icon_text, 0, wxEXPAND | wxALL, 10 );
+
+ topsizer->Add( m_text, 1, wxEXPAND | wxLEFT|wxRIGHT, 10 );