Scrolling by script

Peter Haworth pete at lcsql.com
Sun May 20 16:15:17 EDT 2012


That works as you said it would but if the selected line is not in the
middle third of the lines, it's not visible.

The following code seems to work:

*i*f the hilitedline of me > 12 then

  set the vscroll of me to (word 2 of the selectedline of me - 12) * the
textheight of me

end if

*
*

12 is the magic number because it's half the number of visble lines in the
list.

Pete
lcSQL Software <http://www.lcsql.com>



On Sun, May 20, 2012 at 11:26 AM, J. Landman Gay
<jacque at hyperactivesw.com>wrote:

> Try div 3 instead of div 2. That should set the scroll so that a third of
> the text is off the top, a third is in the middle, and the bottom third
> trails below.



More information about the Use-livecode mailing list