Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TopIndex

Status
Not open for further replies.

Nordlund

Programmer
Jul 17, 2001
458
SE
Hi all...
TListBox has a property called TopIndex.

But how do I change TopIndex in a TListView?
 
Nordlund,

According to the Help file, TListView also has a TopItem property, though its behavior depends on the ViewStyle. Here's the relevant quote:

"Read TopItem to determine the first item in the list view that the user can see. TopItem reflects how far the list view has been scrolled.

TopItem is only implemented when ViewStyle is vsReport or vsList. For vsIcon and vsSmallIcon view styles, use the ViewOrigin property to determine the scroll position."

Now, if you're trying to make sure a certain item is displayed, take a look at TListItem.MakeVisible.

Hope this helps...

-- Lance

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top