From 20d10ee18bc903516d3a41264c9c7cbb7cc677c4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 23 Feb 1999 18:13:52 +0000 Subject: [PATCH] SetSelection(from, to) and SetEditable() implemented git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/combobox.cpp | 10 ++++++---- src/gtk1/combobox.cpp | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index ad273a35ea..bd84d75da3 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -503,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 ) diff --git a/src/gtk1/combobox.cpp b/src/gtk1/combobox.cpp index ad273a35ea..bd84d75da3 100644 --- a/src/gtk1/combobox.cpp +++ b/src/gtk1/combobox.cpp @@ -503,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 ) -- 2.45.2