]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/choice.cpp
wxApp::GetComCtl32Version seems possible and works now with DMC.
[wxWidgets.git] / src / msw / choice.cpp
index 6abcdaef9aa6822dfe8841f77ea869411f884a8f..52cf225acc167ab7d29c19a1d771fd457f6e059a 100644 (file)
@@ -232,7 +232,8 @@ int wxChoice::DoAppend(const wxString& item)
     {
         // we need to refresh our size in order to have enough space for the
         // newly added items
-        UpdateVisibleHeight();
+        if ( !IsFrozen() )
+            UpdateVisibleHeight();
     }
 
     return n;
@@ -250,7 +251,8 @@ int wxChoice::DoInsert(const wxString& item, int pos)
     }
     else // ok
     {
-        UpdateVisibleHeight();
+        if ( !IsFrozen() )
+            UpdateVisibleHeight();
     }
 
     return n;
@@ -267,7 +269,8 @@ void wxChoice::Delete(int n)
 
     SendMessage(GetHwnd(), CB_DELETESTRING, n, 0);
 
-    UpdateVisibleHeight();
+    if ( !IsFrozen() )
+        UpdateVisibleHeight();
 }
 
 void wxChoice::Clear()
@@ -276,7 +279,8 @@ void wxChoice::Clear()
 
     SendMessage(GetHwnd(), CB_RESETCONTENT, 0, 0);
 
-    UpdateVisibleHeight();
+    if ( !IsFrozen() )
+        UpdateVisibleHeight();
 }
 
 void wxChoice::Free()
@@ -477,8 +481,8 @@ void wxChoice::DoSetSize(int x, int y,
         size_t nItems = GetCount();
         if ( !nItems )
             nItems = 9;
-        else if ( nItems > 39 )
-            nItems = 39;
+        else if ( nItems > 24 )
+            nItems = 24;
 
         // add space for the drop down list
         const int hItem = SendMessage(GetHwnd(), CB_GETITEMHEIGHT, 0, 0);