I am attempting to create a manual.
The user clicks an index item and is sent to the related card (eg Card A).
On Card A I use a scrolling field to display the related information. Sometimes the information on a card needs qualification with information on another card. I link to the other card using "on linkClick" to simulate a hyperlink.
Sometimes the qualified information is quite small and I have been using a button on Card A to display the information in a pop-up field using mouseDown - to show the field and mouseUp to hide the field.
A card could have both a hypertext link to another card and a button to pop-up of information. The problem is I have 2 navigation "styles" blue text for the hyperlink which is intuitive for most users experienced with the internet and bold black text where the user has to do a mental jump to "Oh there must be a button somewhere for a pop-up". If I wasn't using a scrolling field I would place a transparent button under the pop-up text and I would have the best of both worlds.
Is there any way to get the "on linkClick" to display the pop-up whilst the mouse is down and hide it when the mouse is up? If not, is there some other technique I could employ?
Thanks in anticipation
Hyperlinking and pop-ups
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 25
- Joined: Mon Dec 05, 2011 5:34 pm
Re: Hyperlinking and pop-ups
Hi,
You could use the mouseMove message to show a specific tooltip whenever the textStyle of the mouseChunk is "group" or "link" en run your current linkClicked handler just the way you already do.
Kind regards,
Mark
You could use the mouseMove message to show a specific tooltip whenever the textStyle of the mouseChunk is "group" or "link" en run your current linkClicked handler just the way you already do.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Livecode Opensource Backer
- Posts: 25
- Joined: Mon Dec 05, 2011 5:34 pm
Re: Hyperlinking and pop-ups
Mark, thank you very much. Your suggestion worked a treat.
on linkClicked myLink
if myLink contains "laws 3" then
go card "Laws 3 & 4"
end if
end linkClicked
on mouseMove
if the mouseChunk is not empty and \
"bold" is among the items of the textStyle of the mouseChunk \
and "italic" is among the items of the textStyle of the mouseChunk
then show image "appendix B1"
else hide image "appendix B1"
end mouseMove
In fact I may get rid of the on linkClicked entirely and use mouseMove for both
cheers
Paul
on linkClicked myLink
if myLink contains "laws 3" then
go card "Laws 3 & 4"
end if
end linkClicked
on mouseMove
if the mouseChunk is not empty and \
"bold" is among the items of the textStyle of the mouseChunk \
and "italic" is among the items of the textStyle of the mouseChunk
then show image "appendix B1"
else hide image "appendix B1"
end mouseMove
In fact I may get rid of the on linkClicked entirely and use mouseMove for both
cheers
Paul