Home All Groups Group Topic Archive Search About

ListView, selecting items during form load does not work

Author
1 Jun 2006 9:47 AM
Matt
During the Load event of my form it is refusing to select any items in
my ListView.

After the ListView has been populated with five items the following VB
code always shows a message box with the value 0.

ListView1.Items(1).Selected = True
MessageBox.Show(ListView1.SelectedItems.Count)

If I move the same code to a button click event it works and the
message box displays the value 1.

Is this something that can be fixed?

Thanks,

Matt

AddThis Social Bookmark Button