Link text style -- bug or feature ?
J. Landman Gay
jacque at hyperactivesw.com
Thu Nov 2 18:01:28 CST 2006
Timothy Miller wrote:
> This arises from a question I asked on the forum, then solved on my own,
> by trial and error.
> If I set the textstyle of a field to "link," by script or manually, text
> entered into that field looks like a link. It's blue and underlined.
> However, it doesn't act like a link. When clicked it sends a mouseUp,
> not a linkClicked. If I select the text, the "text" menu has a
> checkmark by "Plain," not by "Link"
This is the difference between field-level settings and character-level
settings. If you set the default style of a field, any text you put into
that field will inherit the style. But the text itself doesn't have any
style; the appearance of the text is just reflecting the style of its
owner, the field.
Text in a styled field can also have its own style. Character-level
styling overrides any field text styles.
> If I select the text, the "text" menu has a checkmark by "Plain,"
> not by "Link"
Because the text has no style of its own yet, it only has inherited
style. If you select the field with the edit tool, rather than selecting
the text inside the field with the browse tool, the inspector will show
the default style setting of the field.
To make a link, Rev requires actual linked text at the character level.
Since the text itself has no style in this case, and the field is
locked, you are getting the normal mouseUp message instead of linkClicked.
To get a linkClicked message, assign the style to the text characters
themselves. If you set the style of char 1 to -1 of the field to "link"
you will get what you expect. (This is the same as dragging over the
text and selecting the style from the menu.)
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode