X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f36e602b3f4cccedfa2d8932c288f3dfed7b549e..04fa04d8067d235ab45b5bc05b65f0679634b541:/src/generic/textdlgg.cpp diff --git a/src/generic/textdlgg.cpp b/src/generic/textdlgg.cpp index 50ea1ad378..d6e402bd1f 100644 --- a/src/generic/textdlgg.cpp +++ b/src/generic/textdlgg.cpp @@ -71,7 +71,7 @@ wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent, const wxString& value, long style, const wxPoint& pos) - : wxDialog(GetParentForModalDialog(parent), + : wxDialog(GetParentForModalDialog(parent, style), wxID_ANY, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE), m_value(value) @@ -107,7 +107,7 @@ wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent, #endif // wxUSE_VALIDATORS // 3) buttons if any - wxSizer *buttonSizer = CreateSeparatedButtonSizer(style & ButtonSizerFlags); + wxSizer *buttonSizer = CreateSeparatedButtonSizer(style & (wxOK | wxCANCEL)); if ( buttonSizer ) { topsizer->Add(buttonSizer, wxSizerFlags(flagsBorder2).Expand()); @@ -151,7 +151,15 @@ void wxTextEntryDialog::SetValue(const wxString& val) } #if wxUSE_VALIDATORS + +#if WXWIN_COMPATIBILITY_2_8 void wxTextEntryDialog::SetTextValidator( long style ) +{ + SetTextValidator((wxTextValidatorStyle)style); +} +#endif + +void wxTextEntryDialog::SetTextValidator( wxTextValidatorStyle style ) { wxTextValidator validator( style, &m_value ); m_textctrl->SetValidator( validator );