Simple tutorial on linktext and clicking list text
sarahr at genesearch.com.au
Wed Jan 26 16:30:50 CST 2005
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
else if pLink contains "http" then
-- do something else
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
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"
On 26 Jan 2005, at 8:21 pm, Stephen Van Esch wrote:
> 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.
> Do you Yahoo!?
> Yahoo! Mail - Find what you need with new enhanced search.
> use-revolution mailing list
> use-revolution at lists.runrev.com
More information about the use-livecode