Tabbed buttons

Sarah sarahr at genesearch.com.au
Tue Nov 4 18:23:38 EST 2003


As Jan said, setting the menuHistory will select the tab AND send a 
menuPick message.
If you would prefer to use the mouseUp message, you can still set and 
read the menuHistory, but if you have to menuPick handler, it won't 
trigger anything to happen when you set it.

menuHistory is a number but you can convert it to & from a text entry 
by getting the lineOffset of the entry in the button as the tab names 
(menuItems) are stored as separate lines in the button itself.
e.g. to select the tab with the text "Tab2"
get lineOffset("Tab2", btn "Tabs")
set the menuHistory of btn "Tabs" to it

Cheers,
Sarah
sarahr at genesearch.com.au
http://www.troz.net/Rev/

On Tuesday, November 4, 2003, at 11:00  pm, Jim Hurley wrote:

> I have an opening stack with 1 card. On this card is a  5 tab button. 
> Each tab opens a different stack.
>
> When the stack opens, one of the tabs is selected (of course.) If I 
> want to select *this* tab the button does not receive a "menupick" 
> message and I cannot execute the item pick of that tab.
>
> But it does respond to a "mouseUp" message. Is there some was of 
> determining which tab is selected so that I might use the "mouseUp" 
> message to execute the item associated with that tab?
>
> Jim



More information about the use-livecode mailing list