开发者

Modify scroll speed, treeview drag&drop in C#

i have a treview control with drag&drop functionality that response to draw the node outside the visible limits scrolling in the apropiate direction. The problem is that it 开发者_StackOverflowscroll at light speed. I need a way to modify this speed.


You should use a Timer. Enable it when you detect the item getting dragged near the top or bottom of the client area. Simply avoiding scrolling when the timer is busy. The Interval property of the timer determines how fast the scrolling takes place. A bonus effect is that the user can speed up the scrolling by waving the dragged item up-and-down.

I wrote some sample VB.NET code that uses this approach, you'll find it in this thread.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜