
Selecting the first item of a listview
Hi there,
I found the following on the VB5 Help file :
To programmatically select a ListItem object, use the Set statement
with the SelectedItem property, as follows:
Set ListView1.SelectedItem = ListView1.ListItems(1)
After populating the listview on my Form Load routine, I wanted to
select the first item automatically. So I did what the help told me
but it doesn't work. I even tried a
ListView1_ItemClick ListView1.ListItems(1)
at the end of my form load routine. Well, it does select the first
item but it does not highlight it so the user can see it selected.
What am I doing wrong here ?
Thanks a lot,
Wagner Maxsen