diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index 7a34885a6d..d2657810e1 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -681,6 +681,7 @@ wxPG_PROP_CLASS_SPECIFIC_3 = 0x00400000 */ #define wxPG_DATE_PICKER_STYLE wxS("PickerStyle") +#if wxUSE_SPINBTN /** SpinCtrl editor, int or double. How much number changes when button is pressed (or up/down on keyboard). */ @@ -690,6 +691,12 @@ wxPG_PROP_CLASS_SPECIFIC_3 = 0x00400000 */ #define wxPG_ATTR_SPINCTRL_WRAP wxS("Wrap") +/** SpinCtrl editor, bool. If true, moving mouse when one of the spin + buttons is depressed rapidly changing "spin" value. +*/ +#define wxPG_ATTR_SPINCTRL_MOTION wxS("MotionSpin") +#endif // wxUSE_SPINBTN + /** wxMultiChoiceProperty, int. If 0, no user strings allowed. If 1, user strings appear before list diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index 4f39b4a780..d7216abfe1 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -258,7 +258,7 @@ wxPGWindowList wxPGSpinCtrlEditor::CreateControls( wxPropertyGrid* propgrid, wxP wxSpinButton* wnd2; #if IS_MOTION_SPIN_SUPPORTED - if ( property->GetAttributeAsLong(wxT("MotionSpin"), 0) ) + if ( property->GetAttributeAsLong(wxPG_ATTR_SPINCTRL_MOTION, 0) ) { wnd2 = new wxPGSpinButton(); } @@ -319,7 +319,7 @@ bool wxPGSpinCtrlEditor::OnEvent( wxPropertyGrid* propgrid, wxPGProperty* proper if ( evtType == wxEVT_SCROLL_LINEUP || evtType == wxEVT_SCROLL_LINEDOWN ) { #if IS_MOTION_SPIN_SUPPORTED - if ( property->GetAttributeAsLong(wxT("MotionSpin"), 0) ) + if ( property->GetAttributeAsLong(wxPG_ATTR_SPINCTRL_MOTION, 0) ) { wxPGSpinButton* spinButton = (wxPGSpinButton*) propgrid->GetEditorControlSecondary();