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

Re: Access information of an optionsmenu



martyn.2.russell@bt.com wrote:

>What version of gtk are you using because, it doesnt exist in the
>documentation or my version, and yes, I knew the gtk_option_menu_set_history
>function existed, but couldnt see a "get" function to co-work with it
>
>
>Regards,
>
>Martyn
>
It appears to exist in the header files on my machine for both 1.2 and 
2.0. See what grep said when the following things happened from my 
/usr/include directory:

[iain@localhost include]$ grep -n gtk_option_menu_set_history gtk-2.0/gtk/*
gtk-2.0/gtk/gtkoptionmenu.h:83:void       gtk_option_menu_set_history 
(GtkOptionMenu *option_menu,
[iain@localhost include]$ grep -n gtk_option_menu_set_history gtk-1.2/gtk/*
gtk-1.2/gtk/gtkoptionmenu.h:73:void       gtk_option_menu_set_history 
(GtkOptionMenu *option_menu,

You're right, though. It isn't in the gtk 1.2 docs.

>
>-----Original Message-----
>From: Iain McCoy [mailto:iainmccoy@optushome.com.au]
>Sent: Tuesday, April 09, 2002 10:20 AM
>To: Norbert.Haefke@Freudenberg.de
>Cc: gtk-app-devel-list@gnome.org
>Subject: Re: Access information of an optionsmenu
>
>
>Norbert.Haefke@Freudenberg.de wrote:
>
>>Hi 
>>
>>Question about the option menu:
>>
>>I need to figure out wich option was choosen from the user.
>>I dont wont to use callbacks for this.
>>
>>Is there any function (or way) to get information
>>
>>from the optionmenu which option is currently displayed.
>
>>Thanks for help
>>
>>Norbert
>>
>Perhaps I'm missing the point, but from the docs at 
>http://developer.gnome.org/doc/API/2.0/gtk/gtkoptionmenu.html#GTK-OPTION-MEN
>U-GET-HISTORY, 
>there is a function (gtk_option_menu_get_history) that "Retrieves the 
>index of the currently selected menu item. The menu items are numbered 
>from top to bottom, starting with 0." This sounds like exactly what is 
>required.
>
>Iain
>




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