hyperLinking from text field

cowhead at mac.com cowhead at mac.com
Fri Sep 13 05:00:01 EDT 2002

James wrote:

> GHow can I build a scrollable field that works like an html table with 
> 120
> buttons in it. Each of the buttons needs to lonk to a specific card. Can
> this also be done with a text field.

Check out "linkText" property in the docs.  It's a beautiful thing.  If 
each 'button' (just really 'names' in this case) is on a separate line, 
make your field a list field (set list behaviour to true), set the 
textstyle of the field to "link",  then set the linkText for each line 
in the field to "cardName" of the card that you want to go to (you can 
do this easily with a script).

Then, in the mouseup handler of the field, you put
get the selectedChunk
put the linkText of it into whereGo
go to card whereGo

If you want to do something fancier, just ask :-)

mark mitchell

More information about the Use-livecode mailing list