Discussion Locked
0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am using VB.Net and want to create a custom event. I have two list boxes, of the same size, that when I scroll one of them, I would like the other listbox to scroll too. In VB 6, there was a scoll event. Now in .Net, the SelectedIndexChanged event is the replacement, but requires the user to click inside of the list box. I would like it to change when the user clicks the vertical scroll bar. I believe that a custom event, "ScrollChanged", would be a solution, but I do not know how to create it. Anyone know how to help please respond. Thank you.
1 reply
by bckurd
Yes .Net doesn't have scrolling event for list boxes. However there is a way to do that. First do not define vertical scrolling for the list boxes for both of them. Add another scrolling object (vertical one) on to your form. You will be able to control the scrolling event for the scrollbar.
Whenever the value of scroll changes, you can carry the index of list box to top. So you will be listing the items in the list box with playing its index in the list. The both list boxes can act same at same time.
I hope that helps!
Bedri.
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending
1 helpful
10 replies
1 helpful
3 replies
Question
Windows and macOS computers becoming slow or unstable after updates - what should I check first
0 helpful
1 reply
Discussion
Optimizing WordPress widgets and DOM size
0 helpful
3 replies
Discussion Locked
Best Ways to Improve Website Visibility
0 helpful
5 replies