Deleting lines in a scrolling list box?

Scott Kane scott at cdroo.com
Tue Nov 28 04:54:35 EST 2006


I've got a nice little scrolling list box working nicely (many thanks to the 
ever patient Eric), but I'm having trouble with deleting the line.  It seems 
to work sometimes and not others - and even then not on all lines.  The code 
I'm trying to wring out is below:

-- This handler is in the scrolling list field

on mouseUp
  global y
  put the clickline into y
end mouseUp

-- This handler is in a button called Delete

on mouseUp
  global y
  put the number of lines of fld "Species List" into MyLines
  if MyLines > 1 then
      Delete y else
    Put Empty into fld "Species List"
    end if
end mouseUp

I know there has got to be a drop dead simple way of doing this!!  BTW - 
when I sort all this out I'm going to post the solutions to these pesky 
objects in a stack on RevOnline.  I can't be the only one stumbling here 
when first blundering in. <g>

Scott 




More information about the Use-livecode mailing list