Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a Windows.Forms.ListBox on my form, it has a SelectionMod of one. I'm trying to find out when a user scrolls up or down on the listbox, but doesn't select the entry that's visible, if I can capture that visible value or not. is there a way to do this. Thanks.

What I have tried:

I've tried creating a Control.ListBoxItem, setting a value of it's Content, and then adding that to the Items in the ListBox. The ListBoxItems have an isVisible property that I was hoping to use, but that didn't work.
Posted
Updated 12-Jul-18 14:40pm

1 solution

The property you want is TopIndex. See ListBox Class (System.Windows.Forms)[^]
 
Share this answer
 
Comments
Matthew Menard 16-Jul-18 11:43am    
Thanks, that was it. Appreciate that.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900