+ GList *child = m_list->children;
+ while (child)
+ {
+ GtkBin *bin = (GtkBin*) child->data;
+ gtk_widget_set_style( bin->child,
+ gtk_style_ref(
+ gtk_widget_get_style( GTK_WIDGET(m_list) ) ) );
+ child = child->next;
+ }
+}
+
+bool wxListBox::IsOwnGtkWindow( GdkWindow *window )
+{
+ if (wxWindow::IsOwnGtkWindow( window )) return TRUE;
+
+ GList *child = m_list->children;
+ while (child)
+ {
+ GtkBin *bin = GTK_BIN( child->data );
+ if (bin->child->window == window) return TRUE;
+ child = child->next;
+ }
+
+ return FALSE;
+}
+
+void wxListBox::SetBackgroundColour( const wxColour &colour )
+{
+ wxCHECK_RET( m_list != NULL, "invalid list ctrl" );
+
+ m_backgroundColour = colour;
+ if (!m_backgroundColour.Ok()) return;
+
+ SetBackgroundColourHelper( GTK_WIDGET(m_list)->window );
+
+ GtkStyle *style = (GtkStyle*) NULL;
+ if (!m_hasOwnStyle)
+ {
+ m_hasOwnStyle = TRUE;
+ style = gtk_style_copy( gtk_widget_get_style( GTK_WIDGET(m_list) ) );
+ }
+ else
+ {
+ style = gtk_widget_get_style( GTK_WIDGET(m_list) );
+ }
+
+ style->base[GTK_STATE_NORMAL] = *m_backgroundColour.GetColor();
+ style->bg[GTK_STATE_NORMAL] = *m_backgroundColour.GetColor();
+
+ gtk_widget_set_style( GTK_WIDGET(m_list), style );
+
+ GList *child = m_list->children;
+ while (child)
+ {
+ GtkWidget *item = GTK_WIDGET(child->data);
+ gtk_widget_set_style( item,
+ gtk_style_ref(
+ gtk_widget_get_style( GTK_WIDGET(m_list) ) ) );
+ child = child->next;
+ }
+}