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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user