Re: Clearing GtkComboBoxEntry
- From: Steve Harrington <steven harrington verizon net>
- To: gtk-app-devel-list gnome org
- Subject: Re: Clearing GtkComboBoxEntry
- Date: Tue, 08 Dec 2009 09:35:48 -0800
Carlos Pereira wrote:
I saw this in one an example somewhere and decided to ignore it for the
reason you mention.
David is right,
you should get the entry pointer with gtk_bin_get_child, and after
that you handle this entry as any other entry:
entry = gtk_bin_get_child (GTK_BIN (combo_entry));
gtk_entry_set_text (GTK_ENTRY (entry), "");
In GTK 2.0 you can also use this:
gtk_entry_set_text (GTK_ENTRY (GTK_BIN (combo_entry)->child), "");
but this is not going to work in Gtk 3.0, as these objects will be
sealed from outside access.
In my opinion, you should forget about redundant functions such as
gtk_combo_box_get_active_text, having direct access to the entry pointer
is much better.
] [Thread Prev