Page 1 of 1
Hotwords
Posted: Tue Feb 20, 2007 4:13 pm
by quailcreek
Hello,
How do I build each line of a field into a hotword? I'm not sure if hotword is the correct term in Rev but that's what it's called in toolbook.
Regards
Tom
Posted: Tue Feb 20, 2007 4:30 pm
by malte
Could you describe what a "hotword" does?
All the best,
Malte
Posted: Tue Feb 20, 2007 6:11 pm
by quailcreek
Hi Malte,
A hotword is maybe called hypertext? It more less becomes an object with properties similar to and functioing like a button.
Tom
Posted: Tue Feb 20, 2007 6:27 pm
by Bernard
It's actually quite straightforward.
- create a new mainstack
create a field
put some text into line 1 of the field
lock the field
type this in the message box (make sure the new stack is the one listed in the msg box)
Code: Select all
set the textStyle of line 1 of field 1 to "link"
put this handler in the field:
Code: Select all
on linkClicked theText
if theText is not empty then answer "you clicked" && theText
end linkClicked
Unfortunately the docs with Rev are in a sorry stated. Hard to believe that the PDF docs are still incomplete about a year after v.2.7 was released.
Obviously you can start adding more text to the field to experiement with associating the link with other parts of text. And you can add to that basic handler to do lots of useful stuff.