Allow entering more digits in wxSpinCtrl in wxMSW than fits into it.

Scroll the control automatically if there is not enough space. This is
consistent with (single line) wxTextCtrl and wxSpinCtrl under the other
platforms.

Closes #14211.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-05-09 14:24:27 +00:00
parent 679dc4e813
commit 36b0b09078
2 changed files with 12 additions and 0 deletions

View File

@@ -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;