X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/60b71826d657aea1ea285ec855a55cc8f44192df..fdf20a26dba64a6d31dead1e1d19b2d755c0af13:/src/gtk/bmpcbox.cpp diff --git a/src/gtk/bmpcbox.cpp b/src/gtk/bmpcbox.cpp index 13fb8edf00..7743cd1465 100644 --- a/src/gtk/bmpcbox.cpp +++ b/src/gtk/bmpcbox.cpp @@ -3,7 +3,7 @@ // Purpose: wxBitmapComboBox // Author: Jaakko Salli // Created: 2008-05-19 -// RCS-ID: $Id: +// RCS-ID: $Id$ // Copyright: (c) 2008 Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -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