Return selected item of option menu

Jan Schenkel janschenkel at yahoo.com
Fri Nov 12 10:53:52 EST 2004


--- Kaveh Bazargan <kaveh at focalimage.com> wrote:
> This must be easy, but I can't find it!
> 
> I have an option menu with 3 lines in the content:
> 
> choice 1
> choice 2
> choice 3
> 
> I want to get the selected item. What is the command
> for that? when I type
> 
> put btn myButton
> 
> I get all three lines
> 
> When I ask for selectedLine, I get
> 
> line 3 of button 8
> 
> ----------------------
> 
> Also, is there a handler to test when the selection
> of the button has been
> changed? i.e. like MenuPick, but only if the menu
> item picked is different
> to the one there previously.
> -- 
> 
> Kaveh Bazargan
> 

Hi Kaveh,

The property you're looking for is either
'menuHistory' (this gives you the number of the last
selected line) or 'label' (this gives you the text of
the currently selected line).
As for a message, I'm afraid 'menuPick' is your only
option, and you may want to save the menuHistory on
mouseDown to compare it later in your menuPick
handler.

Hope this helped,

Jan Schenkel.

=====
Join us at the European Revolution Conference
November 14-16, MALTA. ~ http://TechieTours.com/Rev/

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


		
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 



More information about the use-livecode mailing list