BoldDesk®Customer service software offering ticketing, live chat, and omnichannel support, starting at $49/mo. for 10 agents. Try it for free.
Visual Basic. WinForms. TreeViewAdv.
Scrolling up and down the TreeViewAdv with the mouse wheel is very slow and goes node by node (jerky). An example is how on a text file you can arrow up/down and go line by line (which is what it is doing), but with Page Up/Down you go by page (which is what I want).
There seems to be no way to get the mouse wheel to scroll by page. If I was using Microsoft TreeView they mention setting MouseWheelScrollLines to -1 to scroll by page. Doing so with SyncFusion TreeViewAdv disables all mouse wheel scrolling.
If I click on an empty area in the scroll bar with the mouse, it will do by page just fine. I just can't get it to work with the mouse wheel. Please advise me if there is a way to get the mouse wheel to scroll properly.
Other than this, I find TreeViewAdv very fast, much faster than Microsoft TreeView.
I am posting this here rather than making a bug report because I am an amateur programmer and it might be user error.
Thank you for your help in this matter.
Hi Bruce Halpern,
Solution 1:
We suspect that your requirement is to scroll a more number of nodes using the
mouse wheel scroll. By default, the mouse wheel scroll in TreeViewAdv performs
the scrolling for 3 nodes. If we need to increase the node count when the mouse
wheel scroll in TreeViewAdv can be achieved by setting the
MouseWheelScrollLines property. Refer to the below code snippet,
//Scroll the 22 nodes at a time mouse wheel scroll treeViewAdv1.MouseWheelScrollLines = 22; |
UG Link: https://help.syncfusion.com/windowsforms/treeview/runtime-features#scrolling-using-mouse
Solution 2:
You can set the multiplier of mouse wheel scrolling by using the HScrollIncrement
and VScrollIncrement property
based on Horizontal and vertical scrolling in TreeViewAdv. Refer to the below
code snippet,
//multiplier of mouse wheel scroll by setting the HScrollIncrement and VScrollIncrement property this.treeViewAdv1.HScrollIncrement = 5; this.treeViewAdv1.VScrollIncrement = 5; |
UG Link: https://help.syncfusion.com/windowsforms/treeview/scrollbar-customization#scrollincrement
Find the sample demo in the attachment.
Regards,
Vijayarasan S
If this post is helpful, please consider Accepting it as the solution so that
other members can locate it more quickly.
Thank you.
To help others in the future, here is everything I did (VB WinForms):
For:
treeViewAdv1.MouseWheelScrollLines = 22
Instead of this, the TreeViewAdv Properties has MouseWheelScrollLines. I set that to 1.
The real thing that helped was the:
this.treeViewAdv1.VScrollIncrement = 5
I changed it to:
treeViewAdv1 .VScrollIncrement = treeViewAdv1.VisibleCount
this has the mouse wheel scroll exactly the amount to have it so moving the mouse scroll wheel once equals one page of the tree. I placed this line in the Form_Load.
However, if the form size changes due to someone changing it from full screen to windowed, or drags the window edge to resize, or moves the form to a different resolution monitor, then it would no longer scroll one page but either more or less.
To fix that, also adding treeViewAdv1 .VScrollIncrement = treeViewAdv1.VisibleCount to:
Private Sub treeViewAdv1_Resize(sender As Object, e As EventArgs) Handles treeViewAdv1.Resize
treeViewAdv1.VScrollIncrement = treeViewAdv .VisibleCount
End Sub
makes sure that it will always scroll exactly one page no matter how much the size of the TreeViewAdv changes.
I would like to thank you very much for your advice. Without it, I was completely baffled and unable to do anything about this issue.
Bruce Halpern,
We are glad to know that the reported problem has been resolved at your end.
Please let us know if you have any further queries on this. We are happy to
help you😊.