From 745cf1fff98e2fdc68ebc377d9ce5f98fdb75c7d Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 6 Feb 2007 08:47:45 +0000 Subject: [PATCH] Backported corrections to head git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/spinctrl.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index 8f693d0576..f66f6bfbcf 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -373,7 +373,6 @@ bool wxSpinCtrl::Create(wxWindow *parent, } wxSpinButtonBase::SetRange(min, max); - SetValue(initial); m_oldValue = initial; @@ -404,6 +403,14 @@ bool wxSpinCtrl::Create(wxWindow *parent, // associate the text window with the spin button (void)::SendMessage(GetHwnd(), UDM_SETBUDDY, (WPARAM)m_hwndBuddy, 0); + SetValue(initial); + + // Set the range in the native control + SetRange(min, max); + + // Send the initial event + SendSpinUpdate(initial); + if ( !value.empty() ) { SetValue(value);