Can I create a label that is a link? I created the label and on the card open....
set the textStyle of "Register" to link
...where Register is the name of the label. It is not working.
I am not sure if I can create a label as a link. Is this even possible?
Warren
Create Link Label
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
You need to refer to the actual label field in your script. Also, it is a bit easier to set the textStyle of the field's content, and then its linkText.
Then you set the script of the label field to something like
Now when you click on the label's linked text, you should get a message box with the text "This is a Test" and an "OK" button.
Hope this helped,
Jan Schenkel.
Code: Select all
set the textStyle of char 1 to -1 of field "MyLabelField" to "link"
set the linkText of char 1 to -1 of field "MyLabelField" to "This is a Test"
Code: Select all
on linkClicked pLink
answer pLink
end linkClicked
Hope this helped,
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com