making a hyperlink

J. Landman Gay jacque at hyperactivesw.com
Sat Nov 22 12:35:45 EST 2003


On 11/22/03 12:56 AM, Alex Rice wrote:

> Why does the 2nd method work, but not the 1st?
> 
> 1) new label field. Put a URL into it. Text Menu | Link. Now it appears 
> to be a link, but no linkClicked message is sent.

In this case, there is no text selected so you are setting the default 
style of the entire field to "link", just as you might set the style of 
a field to "bold". Whatever text you put into the field later will also 
acquire the link style. There is no character-level styling here, and so 
the individual characters inside the field do not qualify as a link.

> 2) new label field. Put a URL into it. Properties inspector | Contents | 
> Select all of the URL's text. Text Menu | Link. Now it appears to be a 
> link, and a linkClicked message IS sent.

Here you are selecting a string and setting its style at the character 
level. This is something that Rev can respond to, since linked text is 
always defined as a string of characters.

You could accomplish the same thing via the Text menu by unlocking the 
field, selecting the characters, using the Text menu to set the style, 
and then relocking the field. The crucial part is that the link style 
can only be applied to a string of characters.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list