Correct the initial value setting in wxMSW wxSpinCtrl.
Always use value argument for the text control contents and also override the initial numeric value with it if it's numeric. This seems to be the only consistent thing to do, so document this behaviour and add a unit test checking for it. Closes #13589. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -62,6 +62,13 @@ 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 a non-empty string not convertible to a number,
|
||||
otherwise @a initial is simply ignored.
|
||||
|
||||
@param parent
|
||||
Parent window. Must not be @NULL.
|
||||
@param value
|
||||
|
Reference in New Issue
Block a user