// a wxValidator parameter to avoid using "#if wxUSE_VALIDATORS"
// everywhere
class WXDLLIMPEXP_FWD_CORE wxValidator;
- #define wxDefaultValidator (*(NULL))
+ #define wxDefaultValidator (*reinterpret_cast<wxValidator*>(NULL))
// this macro allows to avoid warnings about unused parameters when
// wxUSE_VALIDATORS == 0
const wxBitmap& bitmap,
const wxPoint& pos,
const wxSize& size, long style,
- const wxValidator& wxVALIDATOR_PARAM(validator),
+ const wxValidator& validator,
const wxString& name)
{
if ( !wxBitmapButtonBase::Create(parent, id, pos, size, style,
wnd2->SetRange( INT_MIN, INT_MAX );
wnd2->SetValue( 0 );
+ wxWindow* wnd1 = wxPGTextCtrlEditor::CreateControls(propgrid, property, pos, tcSz).m_primary;
+#if wxUSE_VALIDATORS
// Let's add validator to make sure only numbers can be entered
wxTextValidator validator(wxFILTER_NUMERIC, &m_tempString);
-
- wxTextCtrl* wnd1 = (wxTextCtrl*) wxPGTextCtrlEditor::CreateControls( propgrid, property, pos, tcSz ).m_primary;
wnd1->SetValidator(validator);
+#endif
return wxPGWindowList(wnd1, wnd2);
}
wxBoxSizer* rowsizer = new wxBoxSizer( wxHORIZONTAL );
m_edValue = new wxTextCtrl(this,21,wxEmptyString,
wxDefaultPosition,wxDefaultSize,wxTE_PROCESS_ENTER);
+#if wxUSE_VALIDATORS
wxValidator* validator = GetTextCtrlValidator();
if ( validator )
{
m_edValue->SetValidator( *validator );
delete validator;
}
+#endif
rowsizer->Add( m_edValue,
1, wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL|wxALL, spacing );