Scrolling by script

Peter Haworth pete at lcsql.com
Sun May 20 14:19:30 EDT 2012


That doesn't work.  If I'm understanding it correctly, it scrolls so the
the middle line in the total number of lines in the list is at the top of
the list.  What I need is for the selected line to be positioned in the
middle of the VISIBLE lines in the list, not the total lines.

I should explain a bit more of what I'm trying to achieve.

The scrolling list in question is an"expanding/collapsing" list.  It starts
off life with lines that have a disclosure triangle at the start of them.
 When the user clicks on a line. I change the disclosure triangle to an
"expanded" state, then add indented lines into the list immeditely below
the selected line.  So if I select, for example, the last visible line in
the list, the user cannot see any of the new indented lines unless I scroll
the list so the selected line and its associated indented lines move up.


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



On Fri, May 18, 2012 at 2:19 PM, Bob Sneidar <bobs at twft.com> wrote:

> Get the formatted height of the field, then set the vscroll to that div 2.
> That should work?



More information about the use-livecode mailing list