hyperlinking from list fields

Jan Schenkel janschenkel at yahoo.com
Thu Jul 3 00:19:00 EDT 2003


--- Monte Goulding <xxx at yyy.zzz> wrote:
> 
> Hi all
> 
> I just noticed that something I assumed would work,
> doesn't. It seems you
> can't hyperlink from a list field. Is it a bug? I
> would have thought that
> the hyperlink behavior would override the list
> behavior???
> 
> I want to have a list field with columns (let's say
> name & email). I want to
> be able to select the line and or click on the email
> link and handle the
> linkClicked message. It seems that the linkClicked
> message isn't sent if the
> part of the line you click on is a link. I think it
> should be. What do
> others think????
> 
> I even tried scripting it with mouseUp and the chunk
> references like
> clickChunk and mouseChunk but they seem to refer to
> the line chars not the
> clicked word/group (which makes sense).
> 
> Regards
> 
> Monte
> 

Hi Monte,

Here's an idea that might do the trick :
- create another field "on top" of the column with the
email-addresses
- set its threeD, showBorder and opaque to false
- fill in the addresses, and set the textStyle to link
for each line
- you may have to tweak the margins of the field a bit
to have it overlay "just right"
- now we have to make sure they scroll alongside, so
add to the list field script
  on scrollbarDrag
    set the vScroll of fld "email-addresses" to \
        the vScroll of me
  end scrollbarDrag
- last but not least, to prevent visual problems,
we'll also need to adapt the colour scheme
 . start by setting the properties linkColor,
linkHiliteColor and linkVisitedColor of the stack to
blue or another you like, as long as it's the same and
works both for hilited and not-hilited lines
 . if you want to go the extra mile, you could change
the list field script again to update the textColor of
the individual email-address field lines 'on
selectionChanged' ; this means you'll also have to fix
'on mouseMove' and 'on rawKeyDown' so that they send a
selectionChanged directly, rather than afterwards
(mouseMove) or never (rawKeyDown)

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com



More information about the use-livecode mailing list