Page 1 of 1
put a link on each line of field
Posted: Wed Oct 28, 2015 11:29 am
by problème
Hello
I want to know how to make each line of a field be a link .
when I click on the line 1 of the field , I want to do something, click on the line 2 , do another thing , ...
Re: put a link on each line of field
Posted: Wed Oct 28, 2015 11:45 am
by Dixie
Mmm... well, to easily do what you wish you could use a list field and determine the line that is clicked... put something like this in the script of the field...
Code: Select all
on mouseDown
switch (word 2 of the clickline)
case 1
answer the long time
break
case 2
answer the long date
break
end switch
end mouseDown
Re: put a link on each line of field
Posted: Wed Oct 28, 2015 2:22 pm
by Klaus
Bonjour problème,
you really should work through the "Scripting Conference" stacks I mentioned in one of your earlier postings:
http://www.hyperactivesw.com/revscriptc ... ences.html
Maybe start with stack "Controls" which also handles LIST FIELDS among other basic LC things.
Best
Klaus
Re: put a link on each line of field
Posted: Wed Oct 28, 2015 5:19 pm
by problème
thanks for your help
Re: put a link on each line of field
Posted: Wed Oct 28, 2015 5:26 pm
by FourthWorld
In addition to list fields, you can also use a locked text field with HTML links, responding to the linkClicked message.
Re: put a link on each line of field
Posted: Wed Oct 28, 2015 5:43 pm
by dunbarx
What everyone said.
Also check out the "link" keyword and the "linkText" property. These give you a lot of control over what happens when the user clicks a chunk of text.
Craig Newman