George Lober wrote:
Andrew Haines wrote:
George Lober wrote:
Marc Weustink wrote:
George Lober wrote:
Hi all,
1) Can someone tell me how to make TListView scroll to and show
the topmost item of a list in the top line of the TListView window?
2) How do you scroll to and show a particular item on the top
line of the TListView window ?
ListItem.MakeVisible (or was it EnsureVisible ?)
This won't set the topitem, but it makes it visible atleast.
Yes, that's what I've been using, but like you say it won't set the
top item. It may or may not end up being on top, depending on where
you're scrolling from.
Use makevisible on the last item first.
Listview1.BeginUpdate;
with ListView1 do Items.Item[Items.Count-1].MakeVisible(False);
MyItem.MakeVisible(False);
ListView1.EndUpdate;
Don't quite follow what seems like reverse logic, but it works great!
Thanks for your example Andrew.
BTW,
ListView1.topitem.MakeVisible(true);
does not do anything, it doesn't scroll to the top item, is that a bug ?
George.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives