Jump to content
Fudley

FMX-Android-D12 Scroll TListbox selected item into view

Recommended Posts

FMX-Android-D12  Scroll TListbox selected item into view

 

What I've tried (where lb is a TListbox and newindex is the new itemindex):

 

1.

newindex := lb.selected.index;

lb.scrollby(0.0,lb.itemheight*newindex)

 

2.

oldindex := lb.ItemIndex;
rowheight := lb.Selected.Height;
lb.ViewportPosition :=  PointF(0,rowheight*oldindex) ;

 

3.

lb.ScrollToItem(lb.Selected);

 

 

Neither of these work. Please advise. Much thanks.

Edited by Fudley
added scrolltoitem

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×