|
-
July 15th, 2012, 03:06 AM
#29
Re: Some questions regarding my project
How can I get the two listboxes displaying the words and their paired meanings, to scroll together?
I tried using the MouseWheel event (even though VC didn't have that included in the listbox's "events" list, so I had to manually make it), and setting the two list's TopIndex to the same value there. But for some reason it didn't work, the two lists scrolled pretty much synchronously, but they were mostly off by 2-3 places.
I also manually made a TopIndexChanged event in the code, hoping it would exist as well, but that gave me an error.
EDIT: I ended up using a timer with 10 intervals, making sure the two TopIndex's agree each tick; it works just fine, although I'm not sure if it isn't "wasting" a lot of CPU time.
Last edited by Tusike; July 15th, 2012 at 03:21 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|