简体   繁体   中英

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 scroll 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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM