SetBackground for ListBox and others

Removed the old and famous wxSplitter bug


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1998-10-21 22:21:09 +00:00
parent 0d57be4594
commit fc54776e31
19 changed files with 334 additions and 112 deletions

View File

@@ -130,6 +130,12 @@ void wxComboBox::Append( const wxString &item, char *clientData )
gtk_widget_get_style( m_widget ) ) );
}
if (m_backgroundColour != wxNullColour)
{
GtkBin *bin = GTK_BIN( list_item );
SetBackgroundColourHelper( bin->child->window );
}
gtk_signal_connect( GTK_OBJECT(list_item), "select",
GTK_SIGNAL_FUNC(gtk_combo_clicked_callback), (gpointer)this );
@@ -426,3 +432,18 @@ bool wxComboBox::IsOwnGtkWindow( GdkWindow *window )
(window == GTK_COMBO(m_widget)->button->window ) );
}
void wxComboBox::SetBackgroundColour( const wxColour &colour )
{
wxWindow::SetBackgroundColour( colour );
GtkWidget *list = GTK_COMBO(m_widget)->list;
GList *child = GTK_LIST(list)->children;
while (child)
{
GtkBin *bin = (GtkBin*) child->data;
SetBackgroundColourHelper( bin->child->window );
child = child->next;
}
}