Simple tutorial on linktext and clicking list text
Sarah Reichelt
sarahr at genesearch.com.au
Wed Jan 26 17:30:50 EST 2005
Hi Steve,
Nicholas supplied you with the info for using clickChunks, but here is
some additional stuff on using linktext.
- enter your text in a field
- select a chunk that you want to make into a link
- go to the Text menu and set it's style to "Link"
- if you are using the default settings, the text will go blue &
underlined, like the link on a web page.
- when you have finished setting all the links you want, lock the text
of the field
- edit the script of field to include a linkClicked handler e.g.
on linkClicked pLink
-- pLink contains the complete text of the clicked link
if pLink contains "@" then
revMail pLink
else if pLink contains "http" then
revGoUrl pLink
else
-- do something else
end if
end linkClicked
As a further refinement, you can make the linkText of a selected chunk
into something other than it's text.
Suppose you wanted a link to Google. In your field, type the single
word "Google" and set it's style to Link
In the MessageBox, type: set the linkText of word 1 of fld "MyField" to
"http://www.google.com"
and press Enter.
When the field is locked and you click on Google, the parameter passed
to the linkClicked handler will actually be "http://www.google.com"
Cheers,
Sarah
On 26 Jan 2005, at 8:21 pm, Stephen Van Esch wrote:
> Folks:
>
> I'm new to Revolution and I'd like basic, step-by-step
> instructions on making text in a field clickable. I've
> gone through the Rev docs but can't seem to get
> anything to work.
>
> Please note that I have never attempted this type of
> thing before so some things that may be obvious aren't
> for me. For example, when I enter code, where exactly
> do I enter it? As a card, object, or stack script?
>
> Sorry for the annoyance. I've managed to build a
> simple stack using buttons but I'd prefer to use links
> and clickcable lists if possible.
>
> Thanks.
>
> Steve
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Find what you need with new enhanced search.
> http://info.mail.yahoo.com/mail_250
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
>
More information about the use-livecode
mailing list