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) );
// "changed"
//-----------------------------------------------------------------------------
-static void
+static void
gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxComboBox *combo )
{
wxCommandEvent event( wxEVT_COMMAND_TEXT_UPDATED, combo->m_windowId );
SetBackgroundColour( parent->GetBackgroundColour() );
SetForegroundColour( parent->GetForegroundColour() );
+ SetFont( parent->GetFont() );
Show( TRUE );
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()
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 )