From: Vadim Zeitlin Date: Wed, 15 Aug 2007 13:19:31 +0000 (+0000) Subject: use ES_RIGHT|ES_NUMBER styles for the buddy control as it's used for numeric entry... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8e190f0ed9c242e6df5fd4dd99fdaf6c9dea1cda?ds=inline use ES_RIGHT|ES_NUMBER styles for the buddy control as it's used for numeric entry (modified patch 1767478) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index 39e32fbf70..1b9910d66f 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -318,7 +318,12 @@ bool wxSpinCtrl::Create(wxWindow *parent, WXDWORD exStyle = 0; WXDWORD msStyle = MSWGetStyle(GetWindowStyle(), & exStyle) ; - // calculate the sizes: the size given is the toal size for both controls + // this control is used for numeric entry so normally using these flags by + // default shouldn't be a problem, if it is we can always add a style such + // as wxSP_NON_NUMERIC later + msStyle |= ES_RIGHT | ES_NUMBER; + + // calculate the sizes: the size given is the total size for both controls // and we need to fit them both in the given width (height is the same) wxSize sizeText(size), sizeBtn(size); sizeBtn.x = wxSpinButton::DoGetBestSize().x;