auto-hilite text vs. scripting the hilite

Trevor DeVore lists at mangomultimedia.com
Mon Sep 27 17:27:21 EDT 2004


On Sep 27, 2004, at 1:27 PM, RGould8 at aol.com wrote:
> However, I also want to allow the user to click on the filename, 
> hiliite it,
> and hit the Delete key to delete the file.   In order to do that, it 
> seems
> like I need to turn on the "auto hilite text" checkbox, and turn on 
> the "use list
> behavior" checkbox.   However, when I do that, my ability to trap for 
> the
> individual word on a line goes away (the mouseText then returns the 
> text for the
> entire line, so I can't trap for Download or View anymore)
>
> Is there a way I can hilite a line within a text field and still 
> permit "the
> mousetext" command to work?   (So that it only returns the word the 
> user has
> clicked on)
>
> OR, if there was a way to set the hilite of a line via Transcript - - 
> that
> seems like it would work too - - - however, I've found that it only 
> works if I
> have the "auto hilite/Listbox" checkboxes turned on for the field.

Another approach would be to turn on listBehavior and make the 
download/view items images in the field.  When the user clicks on the 
images in your field you can check the value of imagesource in your 
mouseUp/mouseDown handler.  If it equals "myViewImage.png" or 
"myDownloadImage.png" then use clickLine() to get the line clicked and 
you are good to go.

There is a feature request/bug report I reported where a href tags 
don't work with listBehavior set to true.  If they did then you could 
set a href tags for Download and View and then just process the 
linkClicked message.  If you are interested in something like this you 
could vote for it here:

http://support.runrev.com/bugdatabase/show_bug.cgi?id=1903

-- 
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com



More information about the use-livecode mailing list