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
This commit is contained in:
Vadim Zeitlin
2007-08-15 13:19:31 +00:00
parent 0b62d38796
commit 8e190f0ed9

View File

@@ -318,7 +318,12 @@ bool wxSpinCtrl::Create(wxWindow *parent,
WXDWORD exStyle = 0; WXDWORD exStyle = 0;
WXDWORD msStyle = MSWGetStyle(GetWindowStyle(), & exStyle) ; 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) // and we need to fit them both in the given width (height is the same)
wxSize sizeText(size), sizeBtn(size); wxSize sizeText(size), sizeBtn(size);
sizeBtn.x = wxSpinButton::DoGetBestSize().x; sizeBtn.x = wxSpinButton::DoGetBestSize().x;