Re: Clearing GtkComboBoxEntry



Carlos Pereira wrote:
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.

I saw this in one an example somewhere and decided to ignore it for the reason you mention.
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.

Agree.  Thanks.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]