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);
}
}
else if ( event.GetEventType() == wxEVT_COMMAND_COMBOBOX_SELECTED )
{
- // Must override index detection since at this point GetIndex()
- // will return old value.
- wxOwnerDrawnComboBox* cb =
- static_cast<wxOwnerDrawnComboBox*>(propgrid->GetEditorControl());
+ // Must override index detection since at this point GetIndex()
+ // will return old value.
+ wxOwnerDrawnComboBox* cb =
+ static_cast<wxOwnerDrawnComboBox*>(propgrid->GetEditorControl());
- if ( cb )
- {
- int index = cb->GetSelection();
+ if ( cb )
+ {
+ int index = cb->GetSelection();
- if ( index == GetCustomColourIndex() &&
- !(m_flags & wxPG_PROP_HIDE_CUSTOM_COLOUR) )
- askColour = true;
- }
+ if ( index == GetCustomColourIndex() &&
+ !(m_flags & wxPG_PROP_HIDE_CUSTOM_COLOUR) )
+ askColour = true;
+ }
}
if ( askColour && !propgrid->WasValueChangedInEvent() )