scrolling to a line

MisterX b.xavier at internet.lu
Sun Nov 13 13:37:38 EST 2005


> > set the hilitedline of me to lo (0 works ok! ;)
> 
> I don't think so, unless I'm being even denser than usual. If 
> there's no match at all, 'lo' will contain 0, so no scroll at all.

I meant it unselects anything if you click in an empty line ;)

can be handled how you want...

for example if you keep the last selection in a script local

local lastselection

on mouseup
  if line is empty then
    set hilitedline of the field to lastselection
  else
    put the clickline into x
    if it's empty delete then line x -- ;)
    set the hilitedline of the field to x
    put x into lastselection
  etc...

end 

Nice fields get quickly complicated ;)

cheers
Xavier




More information about the use-livecode mailing list