Creating links

Terry Judd tsj at unimelb.edu.au
Thu Oct 24 00:49:00 EDT 2002


>Hi Terry,
>
>This may sound too obvious, but in the menu "Text" you
>can choose the item "Link" to set the style of the
>selected chunk.

Yep - I was doing that. It was setting the linkText that was giving 
me trouble (it'd be nice to be able to do this through a dialog).

Thanks,

Terry...

>
>Either that, or you'll have to add a small button with
>the property 'traversalOn' set to false so the
>selection doesn't change, with script:
>
>   on mouseUp
>     if the selectedChunk is empty then exit mouseUp
>     put the textStyle of the selectedChunk into tStyle
>     switch
>     case tStyle is "plain" or tStyle is empty
>       set the textStyle of the selectedChunk to "link"
>       break
>     case "link" is not among the items of tStyle
>       set the textStyle of the selectedChunk to \
>         (tStyle & comma & "link")
>       break
>     end switch
>   end mouseUp
>
>That should take care of the situations where there's
>no selection or the entire selection already has a
>style of its own -- you'll have a bit more work to do
>if you want to prserve the style of a chunk within the
>selectedChunk.
>
>Hope this helped,
>
>Jan Schenkel.

-- 
Dr Terry Judd
Biomedical Multimedia Unit
Faculty of Dentistry Medicine & Health Sciences
The University of Melbourne
Parkville VIC
Australia



More information about the Use-livecode mailing list