From 4494ad58e8474949e73a3e791caf572986352198 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Tue, 13 Nov 2001 15:18:06 +0000 Subject: [PATCH] Patch to make wxComboBox work in Toolbars. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/combobox.cpp | 6 ++++++ src/gtk1/combobox.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index c138c48a42..3e05764e55 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -178,7 +178,13 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value, if (new_size.y > size_best.y) new_size.y = size_best.y; if ((new_size.x != size.x) || (new_size.y != size.y)) + { SetSize( new_size.x, new_size.y ); + + // This is required for tool bar support + gtk_widget_set_usize( m_widget, new_size.x, new_size.y ); + } + SetBackgroundColour( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_WINDOW ) ); SetForegroundColour( parent->GetForegroundColour() ); diff --git a/src/gtk1/combobox.cpp b/src/gtk1/combobox.cpp index c138c48a42..3e05764e55 100644 --- a/src/gtk1/combobox.cpp +++ b/src/gtk1/combobox.cpp @@ -178,7 +178,13 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value, if (new_size.y > size_best.y) new_size.y = size_best.y; if ((new_size.x != size.x) || (new_size.y != size.y)) + { SetSize( new_size.x, new_size.y ); + + // This is required for tool bar support + gtk_widget_set_usize( m_widget, new_size.x, new_size.y ); + } + SetBackgroundColour( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_WINDOW ) ); SetForegroundColour( parent->GetForegroundColour() );