.net - Indicating a selected item in a listview -


I have a list view control. NET Winforms contains file names from directories. When I first display the control, I pop the list view, then choose the first item in the list in the program like this:

  if (lvwFiles.Items.Count> 0) { ListViewItem firstItem = lvwFiles.Items [0]; First item Selected = true; }  

It works fine, except that the first item in the list should be highlighted visually (reverse-highlight?) To indicate to the user that it has been selected , As the user then clicks on one of the items.

It seems like a stupid question, but I looked at Stakeoverflow and elsewhere and did not see a clear answer. Is this an easy way to do this through a property or something similar?

HideSelection property designer (or via code) is wrong Doing will allow the selected items to be shown, even when the control is not focused.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -