If I am searching for an item in a listview and it is out of view, how do I make it scroll into view and be at the top of the listview, just like the INDEX search in Windows Help?
Printable View
If I am searching for an item in a listview and it is out of view, how do I make it scroll into view and be at the top of the listview, just like the INDEX search in Windows Help?
Try the EnsureVisible method of that item.
Once you find the item you want to show call that method and it should do it.
hope this helps,
John
John Pirkey
MCSD
http://www.ShallowWaterSystems.com
http://www.stlvbug.org
I have already tried that, but it only works if the item is already in view.
Right Click the Listview and select properties.
Set the following dropdown boxes to:
MousePointer: 0-ccDefault
View: 3-lvwReport
Arrange: 0-lvwNone
LabelEdit: 1-lvwManual
Borderstyle: 1-ccFixedSingle
Appearance: 1-cc3D
OLEDragMode: 0-ccOLEDrarManual
OLEDropMode: 0-ccOLEDropNone
The following boxes should be checked:
HideSelection
LabelWrap
Enabled
FullRowSelect
This is what I have in my project to get the scrollbars to scroll...
Thanks for the help, but that is not I am looking for. I want the item to be the first one at the top of the listview, just like when u type the VB Help Topics by INDEX in VB.