Very simple tab button script
Klaus Major
klaus at major-k.de
Tue May 31 04:28:07 EDT 2005
Hi Tom,
> ...
>> Well the beauty of it is that you don't have to name each card for
>> the tab.
>> 1. make a tab button for your stack
>> 2. put in the background (so it appears on every card)
>> 3. put a line in the buttons contents for each card--you don't
>> need to name the card to match the tab!
>>
>> ex. (these are the lines in the buttons contents)
>> Welcome -> line 1, so selecting this will go to cd 1
>> How to use
>> History
>> Preferences -> line 4, so will go to cd 4
>>
>> Then you just have to make sure that your cards are in order.
>>
>> The (only?) advantage of this code over something like:
>> on menuPick tWhich
>> go to card tWhich
>> end menuPick
>>
>> is that the card doesn't need the same name as the tab. It's a
>> small advantage, I know, but it seems simple to me and I will be
>> using it.
>>
>> one small problem is similar text:
>> line 1: Women
>> line 2: Men --> because 'men' is part of 'women', the lineoffset
>> will return '1'. There must be some simple fix for this.
or use:
on menuPick tWhich
go to card (the menuhistory of me)
end menuPick
(the menuhistory of me) will return the NUMBER of the menuline that
has been clicked
and so will work :-)
>> Tom McCarthy
Regards
Klaus Major
klaus at major-k.de
http://www.major-k.de
More information about the use-livecode
mailing list