]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixes to the previous fix
authorJulian Smart <julian@anthemion.co.uk>
Mon, 5 Feb 2007 16:09:54 +0000 (16:09 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 5 Feb 2007 16:09:54 +0000 (16:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44365 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/spinctrl.cpp

index 8f693d0576b52168a1e4425b1c474d3e83819c51..f66f6bfbcf89e1863ebed71ce33cf95d73728a41 100644 (file)
@@ -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);