Disable/Enable selected lines in a field

Bojsza gbojsza at mac.com
Wed Mar 3 09:30:00 EST 2004


Hi,

I have two fields where a user hilites single or multiple lines in 
field "aChoiceList" and then presses a button "Yes" which copies the 
selected lines into field "aSelectedList".

What I am wanting to do is to some how gray out the lines and disable 
them from being selected in field "aChoiceList" that now show in the 
field "aSelectedList.

If the user selects lines in the field "aSelectedList and clicks 
another button "return" then the lines are removed from the field 
"aSelectedList and the associated lines in the field "aChoiceList" 
become ungrayed and available to select again in the future.


I have tried the following but as soon as the user clicks any line in 
the field "aChoiceList" then the hilites are gone and it is still 
possible for them to select and copy the same line again --undesired.

on mouseUp
   lock screen

   if fld "aSelectedList" is not empty then
     put cr after fld "aSelectedList"
   end if

   put hilitedlines of fld "aChoiceList" into aclist
   repeat for each item l in the hilitedlines of fld "aChoiceList"
     put line l of fld "aChoiceList" & cr after fld "aSelectedList"
   end repeat

   set the hilitedlines of fld "aChoiceList" to aclist

   if fld "aSelectedList" is not empty then
     delete last char of fld "aSelectedList"
   end if

   unlock screen
end mouseUp



More information about the use-livecode mailing list