By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,097 Members | 1,351 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,097 IT Pros & Developers. It's quick & easy.

Locking/Synchronizing Multiple Scrollbars

P: 1
Hello everyone. This is my very first post in this forum. I'm taking my first Visual Basic.Net Class and am wanting to try some new things for one of my homework assignments. The assignment is to create a windows application that will allow a user to balance a checkbook. Visually speaking, I want to use multiple list boxes, to display the data: Description, Credit, Debit, Balance, in an effort to emulate the look of a real checkbook ledger. The more I thought about it, it would work for just a few entries, but when the number of entries got to be larger, and the scroll bars are needed on the list boxes, a user would have a difficult time keeping the data aligned if they had to scroll each of the individual list boxes. Is there any way to lock or synchronize the scrollbars of multiple list boxes so they all scroll together?

Again, this is just something extra that I wanted to look into and is not required for the assignment.

Thank You.

Apr 8 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 5K+
P: 8,434
If you study the properties and methods of the listbox I think you will find that it's not too difficult. The idea is simply that when one listbox scrolls (which will probably fire an event, but if not you can watch for it, say in a timer control) you want to set a property on the others to cause them to scroll to the specified point.

I'm not going into specifics for a number of reasons, including:
  • Especially (though not only) in the case of homework/coursework, we don't want to provide cut-paste answers, as that helps nobody and can even get you into trouble. But regardless of the circumstances, it's generally better if we can help you understand something better so that you come to a solution.
  • I work in VB6, so the properties and methods are likely to be different, and just confuse you.
  • You might be better off using some form of grid control rather than a bunch of listboxes.
Apr 9 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.