- int y = message_size.y + 15;
-
- wxTextCtrl *textCtrl = new wxTextCtrl(this, wxID_TEXT, value, wxPoint(-1, y), wxSize(350, -1));
-
- y += 65;
-
- if (style & wxOK)
- {
- ok = new wxButton( this, wxID_OK, _("OK"), wxPoint(-1,y), wxSize(80,-1) );
- m_buttons.Append( ok );
- }
-
- if (style & wxCANCEL)
- {
- cancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxPoint(-1,y), wxSize(80,-1) );
- m_buttons.Append( cancel );
- }
-
- if (ok)
- {
- ok->SetDefault();
- ok->SetFocus();
- }
-
- int w = wxMax( 350, m_buttons.GetCount() * 100 );
- w = wxMax( w, message_size.x );
- int space = w / (m_buttons.GetCount()*2);
-
- textCtrl->SetSize( 20, -1, w-10, -1 );
-
- int m = 0;
- wxNode *node = m_buttons.First();
- while (node)
- {
- wxWindow *win = (wxWindow*)node->Data();
- int x = (m*2+1)*space - 40 + 15;
- win->Move( x, -1 );
- node = node->Next();
- m++;
- }
+ wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
+
+ // 1) text message
+ topsizer->Add( CreateTextSizer( message ), 0, wxALL, 10 );