Clicking on a line in a locked textfield
Posted: Sat Jan 03, 2015 9:17 pm
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.
--------------------------------------------------------------------
My stack is here: https://www.dropbox.com/sh/ja47l87gg87s ... C5ORa?dl=0
File "locked.livecode.zip"
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.
--------------------------------------------------------------------
My stack is here: https://www.dropbox.com/sh/ja47l87gg87s ... C5ORa?dl=0
File "locked.livecode.zip"