popUp button

Sarah Reichelt sarahr at genesearch.com.au
Sun Jan 13 19:28:01 EST 2002


> Hello,
> I have a tabbed button.
> I'd like to set in a script the selectedtext of this button.
> (Not always the first, but depending on a previous situation)
> 
> How can I perform this ?
> 
> Thanks.

set the menuHistory of btn "Tabbed" to x

where x is the number of the tab you want to set. This sets the display and
sends the menuPick message.

If you only have the name of the tab you want to select, try this:

get lineOffset(myTab, btn "Tabbed")
set the menuHistory of btn "Tabbed" to it

(For users of the Starter Kit, this can easily be shortened to a single
line.)

Sarah





More information about the use-livecode mailing list