RE: GtkOptionMenu



On Qui, 2003-03-06 at 11:21, martyn 2 russell bt com wrote:
Again, this is an FAQ similar to the question about how to get and set the
label for a menu.  Perhaps there should be an API call for this...?

  You can't assume there is always a label inside a menu item.  This way
the programmer is fully aware of what he is doing, and what he is
assuming, since he's the one who created the menu item in the first
place.

Regards,
Martyn

-----Original Message-----
From: Gustavo J. A. M. " Carneiro [mailto:gjc inescporto pt]
Sent: 06 March 2003 11:15
To: Audrey Vernon
Cc: gtk-app-devel-list gnome org
Subject: Re: GtkOptionMenu


On Qui, 2003-03-06 at 07:52, Audrey Vernon wrote:
I'm trying to use a GtkOptionMenu, but I can't figure out how to
retrieve the selected text.  I can retrieve the MenuItem but not any
text associated with it.  I was using a combo box but I 
read that if I
don't want to edit the text, it is better to use an option 
menu.  This
seems like it should be very basic, but the API doesn't help any.

  If you can retrieve the menu item already:
    char *text = gtk_label_get_text (GTK_LABEL 
                    (GTK_BIN (menu_item)->child)):

  Or something like that...

-- 
Gustavo João Alves Marques Carneiro
<gjc inescporto pt> <gustavo users sourceforge net>


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

-- 
Gustavo João Alves Marques Carneiro
<gjc inescporto pt> <gustavo users sourceforge net>





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