]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/combobox.cpp
Added support for frames without borders (such as for
[wxWidgets.git] / src / gtk1 / combobox.cpp
index 9db6be50b81f11be78716737abbaad44208478f9..59f2f9821e63630665c6ac0512a35786b7691e74 100644 (file)
@@ -2,9 +2,8 @@
 // Name:        combobox.cpp
 // Purpose:
 // Author:      Robert Roebling
-// Created:     01/02/97
-// Id:
-// Copyright:   (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
+// Id:          $id$
+// Copyright:   (c) 1998 Robert Roebling
 // Licence:    wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
@@ -130,6 +129,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 +431,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;
+  }
+}
+