all groups > vb.net controls > january 2005 >
You're in the

vb.net controls

group:

List View


List View Matt
1/18/2005 2:13:03 PM
vb.net controls: How do I select index 0 in a list view by default?

Thanks,
Matt

Re: List View Matt
1/18/2005 3:00:14 PM
Herfried,

Thanks for your help, but I don't see that anything changed. I may have
misstated my question, so here goes: How do I highlight the first (top)
item in a list view?

Thanks,
Matt

[quoted text, click to view]

Re: List View Matt
1/18/2005 3:26:38 PM
Brian,

It was HideSelection. Thanks for your help, and thanks again to Herfried.

Matt

[quoted text, click to view]

Re: List View Brian Patterson
1/18/2005 5:13:10 PM
Using the method that Herfried suggested will work but you won't actually
see the highlight if the control isn't selected. You can trying setting the
HideSelection property to false which will show the selection even if the
ListView isn't the control that currently has focus. You can also set the
ensurevisible member to true to make sure item 0 it currently in the view.

Brain Patterson
http://dotnet.redeyepos.com

[quoted text, click to view]

Re: List View Herfried K. Wagner [MVP]
1/18/2005 11:47:12 PM
"Matt" <mrocha@camicro.com> schrieb:
[quoted text, click to view]

\\\
Me.ListView1.Items(0).Selected = True
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
AddThis Social Bookmark Button