Tabs
Sarah Reichelt
sarahr at genesearch.com.au
Wed Mar 3 22:04:42 EST 2004
On 4 Mar 2004, at 7:08 am, Lynne Deese wrote:
> I must be missing something but I am unable to get the tab feature
> working.
> Is there a detailed tutorial anywhere for the newbie??
>
Tabs are just a specialized form of button. To get them to work, you
need to add some scripting. When a new tab is clicked, a menuPick
handler is sent with 2 parameters: the new tab and the old tab i.e. the
tab that was selected before the click.
Once you have this information, you can do what you like with it :-)
The commonest uses are to go to a different card or to show/hide groups.
For cards, make the Tab button a group and set it's background behavior
to true so that it appears in all new cards. Make your various cards,
name them and set the tabs to the names of the cards. Then your
menuPick can just "go to card" using the first parameter.
For groups, make your various groups and hide them. Set the tabs to the
names of the groups, then in the menuPick handler, hide the old group
and show the new one.
If you need to set the tab to a particular entry, you can set the
menuHistory to a number, where the number is the number of the tab.
This also sends a menuPick.
If this isn't clear, I can send you an example stack.
Cheers,
Sarah
sarahr at genesearch.com.au
http://www.troz.net/Rev/
More information about the use-livecode
mailing list