]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/choice.cpp
Improvements for notebooks on various versions of GTK
[wxWidgets.git] / src / msw / choice.cpp
index 956e0e418c50a4af339d7de8c2e9a935ebff398c..9688accf39fda261a94ef9a44343249ce2207cb4 100644 (file)
@@ -240,6 +240,12 @@ void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags)
       control_width = longest + cx*5;
     }
   }
       control_width = longest + cx*5;
     }
   }
+  else
+  {
+    // If non-default width...
+    control_width = w1;
+  }
+
 
   // Choice drop-down list depends on number of items (limited to 10)
   if (h1 <= 0)
 
   // Choice drop-down list depends on number of items (limited to 10)
   if (h1 <= 0)
@@ -250,10 +256,6 @@ void wxChoice::SetSize(int x, int y, int width, int height, int sizeFlags)
         h1 = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy)*(wxMin(10, m_noStrings) + 1);
   }
 
         h1 = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy)*(wxMin(10, m_noStrings) + 1);
   }
 
-  // If non-default width...
-  if (w1 >= 0)
-    control_width = w1;
-
   control_height = h1;
 
   // Calculations may have made text size too small
   control_height = h1;
 
   // Calculations may have made text size too small