Deleting lines in a scrolling list box?

Scott Kane scott at cdroo.com
Tue Nov 28 20:27:14 EST 2006


> Note - make sure the 'multipleHilites' for the field is FALSE (meaning the
> user can only select one line in the list), otherwse the script above will
> fail. For a more "universal" script, that works with both single and
> multiple selections, try this:
>
> on mouseUp
>  if the hilitedLines of fld 1 is not empty then
>    put the hilitedLines of fld 1 into tHLines
>    put the number of items of tHLines into tNum
>    repeat with x = tNum down to 1
>      delete line (item x of tHLines) of fld 1
>    end repeat
>   else
>     beep
>   end if
> end mouseUp

Thanks Ken!

Scott 




More information about the use-livecode mailing list