X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e8dba5e29eba7ac5e53fa4035e65ceeaeed3884..5f547a582e954f0ade36014e24eedcdb353f1020:/src/msw/spinctrl.cpp?ds=sidebyside diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index 8f4bd81c89..80d15e665b 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -391,7 +391,7 @@ bool wxSpinCtrl::Create(wxWindow *parent, sizeText.y = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy); } - SetBestSize(size); + SetInitialSize(size); (void)::ShowWindow(GetBuddyHwnd(), SW_SHOW); @@ -449,6 +449,8 @@ void wxSpinCtrl::SetValue(int val) // current value in the control, so do it manually ::SetWindowText(GetBuddyHwnd(), wxString::Format(_T("%d"), val)); } + + m_oldValue = GetValue(); } int wxSpinCtrl::GetValue() const