]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/bmpcbox.cpp
Correctly initialize wxGtkPrintNativeData members.
[wxWidgets.git] / src / gtk / bmpcbox.cpp
index 6cbf891530fa55685d3e20eaf972b15cfba95e0e..7743cd14657cf71273846fe1b28890350a360427 100644 (file)
@@ -164,6 +164,19 @@ GdkWindow *wxBitmapComboBox::GTKGetWindow(wxArrayGdkWindows& windows) const
     return wxChoice::GTKGetWindow(windows);
 }
 
+wxSize wxBitmapComboBox::DoGetBestSize() const
+{
+    wxSize best = wxComboBox::DoGetBestSize();
+
+    int delta = GetBitmapSize().y - GetCharHeight();
+    if ( delta > 0 )
+    {
+        best.y += delta;
+        CacheBestSize(best);
+    }
+    return best;
+}
+
 // ----------------------------------------------------------------------------
 // Item manipulation
 // ----------------------------------------------------------------------------
@@ -288,6 +301,8 @@ void wxBitmapComboBox::WriteText(const wxString& value)
 {
     if ( GetEntry() )
         wxComboBox::WriteText(value);
+    else
+        SetStringSelection(value);
 }
 
 wxString wxBitmapComboBox::GetValue() const