]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/combobox.cpp
some feeble attempts at making wxBeginBusyCursor work
[wxWidgets.git] / src / gtk1 / combobox.cpp
index 8877506e784eb9f18448e837a16e6aab1205da4e..bd84d75da364e719130f7b3b7c664bc7cf7ea1ec 100644 (file)
@@ -42,7 +42,7 @@ static void gtk_combo_clicked_callback( GtkWidget *WXUNUSED(widget), wxComboBox
 
     combo->m_alreadySent = TRUE;
 
-    wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, combo->GetId());
+    wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, combo->GetId());
     event.SetInt( combo->GetSelection() );
     wxString tmp( combo->GetStringSelection() );
     event.SetString( WXSTRINGCAST(tmp) );
@@ -54,7 +54,7 @@ static void gtk_combo_clicked_callback( GtkWidget *WXUNUSED(widget), wxComboBox
 //  "changed"
 //-----------------------------------------------------------------------------
 
-static void 
+static void
 gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo )
 {
     wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, combo->m_windowId );
@@ -134,6 +134,7 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
 
     SetBackgroundColour( parent->GetBackgroundColour() );
     SetForegroundColour( parent->GetForegroundColour() );
+    SetFont( parent->GetFont() );
 
     Show( TRUE );
 
@@ -460,7 +461,7 @@ void wxComboBox::SetInsertionPoint( long pos )
     wxCHECK_RET( m_widget != NULL, "invalid combobox" );
 
     GtkWidget *entry = GTK_COMBO(m_widget)->entry;
-    gtk_entry_set_position( GTK_ENTRY(entry), (int)tmp );
+    gtk_entry_set_position( GTK_ENTRY(entry), (int)pos );
 }
 
 void wxComboBox::SetInsertionPointEnd()
@@ -502,14 +503,16 @@ void wxComboBox::Remove(long from, long to)
     gtk_editable_delete_text( GTK_EDITABLE(entry), (gint)from, (gint)to );
 }
 
-void wxComboBox::SetSelection( long WXUNUSED(from), long WXUNUSED(to) )
+void wxComboBox::SetSelection( long from, long to )
 {
-    wxFAIL_MSG( "wxComboBox::SetSelection not implemented" );
+    GtkWidget *entry = GTK_COMBO(m_widget)->entry;
+    gtk_editable_select_region( GTK_EDITABLE(entry), (gint)from, (gint)to );
 }
 
-void wxComboBox::SetEditable( bool WXUNUSED(editable) )
+void wxComboBox::SetEditable( bool editable )
 {
-    wxFAIL_MSG( "wxComboBox::SetEditable not implemented" );
+    GtkWidget *entry = GTK_COMBO(m_widget)->entry;
+    gtk_entry_set_editable( GTK_ENTRY(entry), editable );
 }
 
 void wxComboBox::OnSize( wxSizeEvent &event )