how to make 2 listbox scroll move sync

lurak

New member
Joined
Jun 19, 2007
Messages
3
Programming Experience
1-3
I have a problem, can anyone help me please

I have two listbox, i want those two to move simultaneously every time i scroll either one of them, by the way the only scroll i need is only the vertical scroll not the horizontal one.................
please help me:eek:
 
Custom Controls

Since there is no event for when the scroll bar is moved. You would have to extend the textbox class in order to make a custom event and custom scroll bar in order to handle this type of thing. You may even want to make a custom control containing two textboxes with a single vertical scrollbar that scroll the two of them together. If I get the time I will provide you with some snipets.

Or Possibly if there is some other control you can use that contains the scroll event this could easily be accomplished but as far trying to figure out when a textbox scroll event if fired is pretty hard to do.

Steve
 
Last edited:
how to make the custom scrollbar.....??
sorry i'm new with the vb.net
please help me, i need this for my final exam.............
 
Google it but I am pretty sure that you are going to have to make a custom control because there is no scroll event in the current text box. You will have to make a class similar to the textbox but add the event for when it scrolls and move the window.

http://www.codeproject.com/vb/net/corescrollbar.asp


That site may be helpful but it definitely confirms my suspicion that creating a textbox that does that may not be as easy as you think.
 
Not really tell me what your project is and maybe I could give you some further guidance. Post the description and I could point you in the right direction. It is just difficult to make that happen with those controls for some reason. You need to find which control has the scroll event and possibly look at the code behind that to see how it tell when it scrolls if possible.
 
Back
Top