unhilite line in list field

Ken Ray kray at sonsothunder.com
Thu Dec 23 14:15:15 EST 2004


On 12/23/04 10:57 AM, "Klaus Major" <klaus at major-k.de> wrote:

>> Sorry I wasn't clear
>> I want to unhilite EACH line after something is done with that
>> particular line .
>> The highlights would go off one after the other as the repeats are
>> worked through, thus indicating to the user the progress of the
>> process.
>> Probably not possible. I thought I would throw it out
> 
> Ah, know i understand :-)
> 
> Sure this is possible...
> 
> ...
>   put the hilitedlines of fld "mylistfield" into tLines
>   put tLines into remaininglines
> repeat for each item i in tLines
>      ## do something with: line i of fld "mylistfield"
>      delete item 1 of remaininglines
>      set the hilitedlines of fld "mylistfield" to remaininglines
> end repeat

And if you want to start with nothing highlighted, and then highlight one
line at a time as you work with the line, you can do this:

set the hilitedLines of fld "mylistfield" to 0  -- clears any hilites
repeat with x = 1 to the number of lines of fld "mylistfield"
  set the hilitedLines of fld "mylistfield" to x
  -- do something with line I of fld "mylistfield"
end repeat
set the hilitedLines of fld "mylistfield" to 0  -- clears any hilites

HTH,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com





More information about the use-livecode mailing list