]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/spinbutt.cpp
correction to maintain data array in synch with string array
[wxWidgets.git] / src / mac / spinbutt.cpp
index d91374445ad78a0cac97e42279e34ca544290201..f5ac7bc9bb64660f145224c52fd2c841ed8e6bc5 100644 (file)
@@ -126,4 +126,23 @@ void wxSpinButton::MacHandleControlClick( ControlHandle control , SInt16 control
   GetEventHandler()->ProcessEvent(event);
 }
 
   GetEventHandler()->ProcessEvent(event);
 }
 
+// ----------------------------------------------------------------------------
+// size calculation
+// ----------------------------------------------------------------------------
+
+wxSize wxSpinButton::DoGetBestSize() const
+{
+    if ( (GetWindowStyle() & wxSP_VERTICAL) != 0 )
+    {
+        // vertical control
+        return wxSize(16,
+                      2*16);
+    }
+    else
+    {
+        // horizontal control
+        return wxSize(2*16,
+                      16);
+    }
+}