Vb.net同步滚动2树视图 [英] Vb.net sync scroll 2 treeview

查看:115
本文介绍了Vb.net同步滚动2树视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的家伙,



请帮我找一个同步滚动两个树视图的方法?我无法找到管理它的方法或属性。我正在尝试这种方法几天。



提前致谢



什么我试过了:



我是VB.NET的新手,有树视图控件

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

推荐答案

您可以捕获一个树视图的滚动事件,并使用它来设置另一个树视图的滚动位置。问题是TreeView的滚动事件没有暴露(我不知道现在是否因为我现在没有VS,但我怀疑没有任何改变)。



我能找到的最新解决方案是 Stack Overflow [ ^ ] post - 它在C#中,但你应该能够解决它或者使用一个免费的在线C#到VB转换器。



或者使用共享 VScrollbar [ ^ ],捕获它移动并相应地设置TreeView
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


这篇关于Vb.net同步滚动2树视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆