Click here to Skip to main content
15,889,786 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear Guys,

Please help me to find a method to sync scroll two treeviews? I am unable to find a method or property to manage it. i am trying for this method for couple of days.

Thanks in advance

What I have tried:

I am new to VB.NET with treeview control
Posted
Updated 16-Jan-18 2:39am

1 solution

You could capture the scroll event of one treeview and use it to set the scroll position of the other. The problem is that the scroll event of TreeView was not exposed (I don't know if it is now as I don't have VS here at the moment, but I suspect that nothing has changed).

The most recent solution I could find was this Stack Overflow[^] post - it's in C# but you should be able to work it out or use one of the free on-line C# to VB converters.

Alternatively use a shared VScrollbar[^] for both TreeViews, capture its movements and set the TreeView up accordingly
 
Share this answer
 

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