On 03/01/15 23:22, Peter M. Brigham wrote:
On Jan 3, 2015, at 3:14 PM, Richmond wrote:

On 03/01/15 21:45, Dr. Hawkins wrote:
I've found references to "locked fields" getting mouseUp, but not a
definition. I would assume locktext, possibly in conjunction with traversal
on, but am not getting anywhere.

I'm successfully setting the selectedLine from mouseMove, but would like to
be able to click on it.

I just set up a stack containing a scrolling list field "SLF"
and 2 other fields: "KLICKT" and "LNVAL"

The field "SLF" contains this script:

on mouseDown
   put the clickLine into fld "KLICKT"
   put the value of the clickLine into fld "LNVAL"
end mouseDown

According to the prefs palette for fld "SLF" the text is locked.

-----------------------------------------------------------------------

Then I set up 2 buttons; "Lock Fields" and "unLock Fields" containing these 
scripts respectively;

on mouseUp
   set the lockLocation of fld "SLF" to true
   set the lockLocation of fld "KLICKT" to true
   set the lockLocation of fld "LNVAL" to true
end mouseUp

on mouseUp
   set the lockLocation of fld "SLF" to false
   set the lockLocation of fld "KLICKT" to false
   set the lockLocation of fld "LNVAL" to false
end mouseUp

The script in fld "SLF" did what is was meant to do regardless of whether the 
fields
were locked or not.
A field will receive mouseup messages if its locktext = true, or if the 
commandkey is down or the controlkey is down or it's a right-click. Other 
properties (traversalon, autohilite, lockLoc) don't affect the field's ability 
to trigger a mouseup message.

-- Peter


New version here: https://www.dropbox.com/sh/ja47l87gg87sn0q/AAAIj99kEQVOb8ev3jz8C5ORa?dl=0

As per suggestion by Klaus.

2 buttons: "LockText" and "unLockText"; they don't seem to make ANY difference
whatsoever to the 'clickability' of the textLines.

Richmond.

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to