Merge branch 'spinctrl-gettextvalue'
Add wxSpinCtrl::GetTextValue() and allow clearing the text value in wxGTK version for compatibility with MSW. See https://github.com/wxWidgets/wxWidgets/pull/2334
This commit is contained in:
@@ -133,6 +133,13 @@ public:
|
||||
*/
|
||||
int GetMin() const;
|
||||
|
||||
/**
|
||||
Returns the text in the text entry part of the control.
|
||||
|
||||
@since 3.1.6
|
||||
*/
|
||||
wxString GetTextValue() const;
|
||||
|
||||
/**
|
||||
Gets the value of the spin control.
|
||||
*/
|
||||
@@ -190,6 +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.
|
||||
|
||||
Notice that, unlike wxTextCtrl::SetValue(), but like most of the other
|
||||
setter methods in wxWidgets, calling this method does not generate any
|
||||
@@ -243,6 +254,14 @@ public:
|
||||
/**
|
||||
Constructor, creating and showing a spin control.
|
||||
|
||||
If @a value is non-empty, it will be shown in the text entry part of
|
||||
the control and if it has numeric value, the initial numeric value of
|
||||
the control, as returned by GetValue() will also be determined by it
|
||||
instead of by @a initial. Hence, it only makes sense to specify @a
|
||||
initial if @a value is an empty string or is not convertible to a
|
||||
number, otherwise @a initial is simply ignored and the number specified
|
||||
by @a value is used.
|
||||
|
||||
@param parent
|
||||
Parent window. Must not be @NULL.
|
||||
@param value
|
||||
@@ -315,6 +334,13 @@ public:
|
||||
*/
|
||||
double GetMin() const;
|
||||
|
||||
/**
|
||||
Returns the text in the text entry part of the control.
|
||||
|
||||
@since 3.1.6
|
||||
*/
|
||||
wxString GetTextValue() const;
|
||||
|
||||
/**
|
||||
Gets the value of the spin control.
|
||||
*/
|
||||
@@ -342,6 +368,10 @@ public:
|
||||
Sets the value of the spin control.
|
||||
|
||||
It is recommended to use the overload taking a double 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.
|
||||
|
||||
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