Don't generate any events from wxSpinCtrl and wxSpinCtrlDouble methods.
After the changes of r53758 wxMSW didn't generate any wxEVT_TEXT events but this was still the case for the generic version (and hence for wxSpinCtrlDouble under MSW too) and wasn't documented. Fix all versions to avoid sending events for programmatic actions, add unit tests checking this behaviour and document it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -179,12 +179,20 @@ public:
|
||||
virtual void SetSelection(long from, long to);
|
||||
|
||||
/**
|
||||
Sets the value of the spin control. Use the variant using int instead.
|
||||
Sets the value of the spin control.
|
||||
|
||||
It is recommended to use the overload taking an integer value instead.
|
||||
|
||||
Notice that, unlike wxTextCtrl::SetValue(), but like most of the other
|
||||
setter methods in wxWidgets, calling this method does not generate any
|
||||
events as events are only generated for the user actions.
|
||||
*/
|
||||
virtual void SetValue(const wxString& text);
|
||||
|
||||
/**
|
||||
Sets the value of the spin control.
|
||||
|
||||
Calling this method doesn't generate any @c wxEVT_SPINCTRL events.
|
||||
*/
|
||||
void SetValue(int value);
|
||||
};
|
||||
@@ -318,12 +326,20 @@ public:
|
||||
void SetRange(double minVal, double maxVal);
|
||||
|
||||
/**
|
||||
Sets the value of the spin control. Use the variant using double instead.
|
||||
Sets the value of the spin control.
|
||||
|
||||
It is recommended to use the overload taking a double value instead.
|
||||
|
||||
Notice that, unlike wxTextCtrl::SetValue(), but like most of the other
|
||||
setter methods in wxWidgets, calling this method does not generate any
|
||||
events as events are only generated for the user actions.
|
||||
*/
|
||||
virtual void SetValue(const wxString& text);
|
||||
|
||||
/**
|
||||
Sets the value of the spin control.
|
||||
|
||||
Calling this method doesn't generate any @c wxEVT_SPINCTRLDOUBLE events.
|
||||
*/
|
||||
void SetValue(double value);
|
||||
};
|
||||
|
Reference in New Issue
Block a user