Discussion:
TListview - scrolling to selected item
(too old to reply)
Tharun Pillay
2008-07-23 14:49:42 UTC
Permalink
This must have been asked before, but I can't seem to see an answer
anywhere.

I was to set the selected item:

lvwMine->Selected = Item;

And I want the listview to scroll to that item since it may 20 entries
down and concealed. How would one go about doing this. I've looked at
the Scroll member of the ListView, but I don't know whether thats the
right way to go about doing it since I'm using a constant row height and
not one that I'm getting from the control.

I'm using the TListView in report format.

Thanks,
Tharun
Remy Lebeau (TeamB)
2008-07-23 17:24:31 UTC
Permalink
Post by Tharun Pillay
lvwMine->Selected = Item;
And I want the listview to scroll to that item since it may
20 entries down and concealed.
TListItem has a MakeVisible() method for that:

lvwMine->Selected = Item;
Item->MakeVisible(false);


Gambit
Tharun Pillay
2008-07-23 18:27:21 UTC
Permalink
Now I'm embarassed.

Thanks Gambit.
Post by Tharun Pillay
Post by Tharun Pillay
lvwMine->Selected = Item;
And I want the listview to scroll to that item since it may
20 entries down and concealed.
lvwMine->Selected = Item;
Item->MakeVisible(false);
Gambit
Loading...