Auto-scroll problem

Yves Coppé yvescoppe at skynet.be
Wed Aug 7 06:35:01 CDT 2002


>put this in the card-script:
>
>## fld 1 is the list-field.
>
>on keyUp lekey
>   if lekey is "a" then
>  ## or whatever is your first letter
>     set the scroll of fld 1 to 0
>     exit keyup
>     ## will scroll to top
>   end if
>   put lineOffset(CR & lekey, field 1) into lo
>   set the scroll of field 1 to lo * the effective textHeight of field 1
>   if lo is 0 then
>     beep
>     ## or whatever...
>   end if
>end keyUp
>
>Tested and works.
>
>You can enhance it by adding some automatic hiliting or
>send "mouseup" etc...
>
>Have a nice day.
>

Thanks.
-- 
Greetings.

Yves COPPE

Email : yvescoppe at skynet.be



More information about the use-livecode mailing list