Re: Using the combobox



Hey, i know this wasn't my question, but i appreciate the answer. i get the
same confusion over how glade did this.  Thanks

shawn

On 8/28/06, Tristan Van Berkom <tvb gnome org> wrote:

Steven Boyls wrote:
> I'm using Glade to design a front-end for my application. My question is
> how to I get the answer from
> the combobox? The gtk documentation for the functions that I'm trying to
> use tell me that I can only use these
> functions if the combobox was created using gtk_combo_box_new_text().
> Well, if I'm using Glade to create these
> combobox's and not gtk_combo_box_new_text() how do I get the chosen text
> from the widget?

Hi Steven,
    if you set any items in the combobox from glade (i.e. the "items"
property),
then libglade will construct your combobox as if it were created with
gtk_combo_box_new_text(), otherwise libglade will assume you are setting
up
your combo box with your own GtkTreeModel and your own GtkCellRenderers.

So in the most practicle case, you can just go ahead and use
gtk_combo_box_get_active_text().

Cheers,
                        -Tristan
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




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