+ for (int i = 0; i < n; i++)
+ {
+ GtkWidget *list_item = gtk_list_item_new_with_label( choices[i] );
+
+ m_clientDataList.Append( (wxObject*)NULL );
+ m_clientObjectList.Append( (wxObject*)NULL );
+
+ gtk_container_add( GTK_CONTAINER(list), list_item );
+
+ gtk_widget_realize( list_item );
+ gtk_widget_realize( GTK_BIN(list_item)->child );
+
+ gtk_widget_show( list_item );
+
+ gtk_signal_connect( GTK_OBJECT(list_item), "select",
+ GTK_SIGNAL_FUNC(gtk_combo_clicked_callback), (gpointer)this );
+ }
+
+ m_parent->AddChild( this );
+
+ (m_parent->m_insertCallback)( m_parent, this );
+
+ PostCreation();
+
+ ConnectWidget( GTK_COMBO(m_widget)->button );
+
+ if (!value.IsNull()) SetValue( value );
+
+ gtk_widget_realize( GTK_COMBO(m_widget)->list );
+ gtk_widget_realize( GTK_COMBO(m_widget)->entry );
+ gtk_widget_realize( GTK_COMBO(m_widget)->button );
+
+ SetBackgroundColour( parent->GetBackgroundColour() );
+ SetForegroundColour( parent->GetForegroundColour() );
+
+ Show( TRUE );
+
+ return TRUE;
+}
+
+wxComboBox::~wxComboBox()
+{
+ wxNode *node = m_clientDataList.First();
+ while (node)
+ {
+ wxClientData *cd = (wxClientData*)node->Data();
+ if (cd) delete cd;
+ node = node->Next();
+ }
+ m_clientDataList.Clear();
+}
+
+void wxComboBox::AppendCommon( const wxString &item )
+{
+ wxCHECK_RET( m_widget != NULL, "invalid combobox" );
+
+ GtkWidget *list = GTK_COMBO(m_widget)->list;
+
+ GtkWidget *list_item = gtk_list_item_new_with_label( item );