logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: accessing selected item from OptionMenu: msg#00123

Subject: Re: accessing selected item from OptionMenu
> you didn't mention whether you were using gtk-perl or gtk2-perl, so i've
> answered for both.

sorry, gtk2 of course... thought you might have rememebered me from a few 
days ago... 
 
> gtk+-2.x adds the incredibly useful gtk_option_menu_get_history function. 
> recall that gtk_option_menu_set_history has always been the way to set which
> item in the menu is selected --- get_history tells you the index of the one
> that is selected.
> 
> so, in gtk2-perl, that would be INTEGER = $optionmenu->get_history.

erm... ok... i'm already *using* set_history... i feel stupid - no suprise 
there then. that is only the position though, not the label string or any 
other data associated with the item.

as for the ItemFactory use, I got as far as getings signals through the 
entries, and finally gave up when I kept getting invalid path errors for 
the accelgroup... nevermind.

thanks

chris


<Prev in Thread] Current Thread [Next in Thread>