Reset wxSpinCtrl value to GetMin() if text string is invalid
Previously, wxSpinCtrl (using native control) and wxSpinCtrlDouble (using the generic implementation) behaved differently in this case, with the former changing its value but the latter keeping the last valid value instead. Make them behave the same by resetting the value in both cases and document this behaviour.
This commit is contained in:
@@ -197,10 +197,10 @@ public:
|
||||
Sets the value of the spin control.
|
||||
|
||||
It is recommended to use the overload taking an integer value instead.
|
||||
The behaviour of this function when @a text doesn't represent a valid
|
||||
number currently differs between the platforms, however passing an
|
||||
empty string does clear the text part contents, without affecting the
|
||||
value returned by GetValue(), under all of them.
|
||||
If @a text doesn't represent a valid number, it may not be shown in the
|
||||
text part of the control at all (only empty string is guaranteed to be
|
||||
supported under all platforms) and the numeric value will be changed to
|
||||
GetMin().
|
||||
|
||||
Notice that, unlike wxTextCtrl::SetValue(), but like most of the other
|
||||
setter methods in wxWidgets, calling this method does not generate any
|
||||
|
Reference in New Issue
Block a user