menus: menu item numbers?

Jan Schenkel janschenkel at yahoo.com
Thu Dec 12 06:55:01 EST 2002


--- Peter Fink <peter.fink at tiscali.ch> wrote:
> Is it possible to work with menu items by item
> number, instead of by name
> (label)?
> 
> I would need it
> - to set the currently selected item  ("set the
> menuItem of btn "optionmenu"
> to 3")
> - to find the currently selected item ("put the
> menuItem of btn "optionmenu"
> into V")
> 
> instead of the scripted workarounds:
> - setting the label myself ("set the label of btn
> "optionmenu" to line 3  of
> btn "optionmenu")
> and on menupick pItem
> - finding the item number myself ("put
> lineoffset(pItem,text of btn
> "optionmenu") into V")
> 
> Peter
> 

Hi Peter,

Have a look at the entry for the 'menuHistory'
property in the Transcript Dictionary.

Hope this helped,

Jan Schenkel.

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

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the use-livecode mailing list