How to make ListView selected item always visible

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, there
I have a scrollable list view control in my C# Windows app. The selected item(s) for list view is programatically set. But some times the selected item is not visible, because the list view is scrollable, and the item is outside visible area
Is there a way to make selected item always in the visible area
Thanks in advance for your help

Michael
 
Hi Michael,

Use the 'EnsureVisible' method on the listview to do this.

Gary

Michael said:
Hi, there,
I have a scrollable list view control in my C# Windows app. The selected
item(s) for list view is programatically set. But some times the selected
item is not visible, because the list view is scrollable, and the item is
outside visible area.
 
Back
Top