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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top