auto-hilite text vs. scripting the hilite

RGould8 at aol.com RGould8 at aol.com
Mon Sep 27 16:27:31 EDT 2004


I've got a text field that contains a list of filenames, along with commands 
to "Download", and "View", like this:

Filename1          Download     View
Filename2          Download     View
Filename3          Download     View
Filename4          Download     View


 What I want to do is make it so that I can trap that the user has clicked on 
the word "Download" or "View".   I am presently doing this successfully using 
the mouseText function and trapping for "Download" or "View"

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.


More information about the use-livecode mailing list