Selecting a List View Item

  • Thread starter Thread starter Brent Hoskisson
  • Start date Start date
B

Brent Hoskisson

I can't figure out what I'm missing here. I set up a list
view control. As I load the form, I select one of the
items in the list view control:

lvwPrograms.Items(0).Selected = True

Everything is handled properly except that the item did
not highlight in the listview control. Do I need to
programatically highlight the item? If so how do I do
this?

Thanks
Brent
 
Brent,

You should also use the EnsureVisible method of the ListViewItem. You may
need to move the code to the Activate Event if you are loading the form with
data before you show it.

Dan
 
Back
Top