- // 4) buttons
- topsizer->Add( CreateButtonSizer( style ), 0, wxCENTRE | wxALL, 10 );
-
- SetAutoLayout( TRUE );
+ // 2) text ctrl
+ m_textctrl = new wxTextCtrl(this, wxID_TEXT, value,
+ wxDefaultPosition, wxSize(300, wxDefaultCoord),
+ style & ~wxTextEntryDialogStyle);
+
+ topsizer->Add(m_textctrl,
+ wxSizerFlags(style & wxTE_MULTILINE ? 1 : 0).
+ Expand().
+ TripleBorder(wxLEFT | wxRIGHT));
+
+#if wxUSE_VALIDATORS
+ wxTextValidator validator( wxFILTER_NONE, &m_value );
+ m_textctrl->SetValidator( validator );
+#endif // wxUSE_VALIDATORS
+
+ // 3) buttons if any
+ wxSizer *buttonSizer = CreateSeparatedButtonSizer(style & (wxOK | wxCANCEL));
+ if ( buttonSizer )
+ {
+ topsizer->Add(buttonSizer, wxSizerFlags(flagsBorder2).Expand());
+ }
+
+ SetAutoLayout( true );