-
- wxSize message_size( wxSplitMessage2( message, this ) );
-
- wxButton *ok = (wxButton *) NULL;
- wxButton *cancel = (wxButton *) NULL;
- wxList m_buttons;
-
- 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 );