diff --git a/docs/changes.txt b/docs/changes.txt index e2ea3f0e85..59e99ea5fc 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -450,6 +450,14 @@ Deprecated methods and their replacements possible or wxWindowDisabler otherwise. +Changes in behaviour visible to end users +----------------------------------------- + +- In wxMSW wxSpinCtrl used to prevent the user from entering more digits than + could fit in its visible area. This was inconsistent with the other ports and + now the control scrolls if too much text is added. + + Major new features in this release ---------------------------------- diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index d5b95d4115..0017413e0a 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -298,6 +298,10 @@ bool wxSpinCtrl::Create(wxWindow *parent, WXDWORD exStyle = 0; WXDWORD msStyle = MSWGetStyle(GetWindowStyle(), & exStyle) ; + // Scroll text automatically if there is not enough space to show all of + // it, this is better than not allowing to enter more digits at all. + msStyle |= ES_AUTOHSCROLL; + // propagate text alignment style to text ctrl if ( style & wxALIGN_RIGHT ) msStyle |= ES_RIGHT;