TreeView - Unable to scroll up when DragOver occurs 
Author Message
 TreeView - Unable to scroll up when DragOver occurs

I have a treeview that has code in the DragOver and DragDrop events.
The DragDrop event accepts a new node into the treeview when the source has
been a node from another treeview.
The DragOver event code changes the SelectedItem to the node that is located
via the HitTest(x,y) method, it also expands the node so the user can
navigate (and select) sub nodes.

The problem is that the DragOver event enables the user to expand the entire
tree by moving the dragged item over every node. As the mouse moves down the
treeview will scroll down as appropriate to the very last node. When the
user goes to scroll back up the treeview - it won't move. You are stuck at
the topmost visible node.

How can I get the entire treeview to scroll back up to the very top of the
tree during the DragOver event?

Thanks
Bill Wood



Sat, 20 Nov 2004 10:09:51 GMT  
 TreeView - Unable to scroll up when DragOver occurs
I solved the problem by applying the "EnsureVisible" method to the previous
node and if there is no previous node the parent node
- but if there is a better way please let me know.


Quote:
> I have a treeview that has code in the DragOver and DragDrop events.
> The DragDrop event accepts a new node into the treeview when the source
has
> been a node from another treeview.
> The DragOver event code changes the SelectedItem to the node that is
located
> via the HitTest(x,y) method, it also expands the node so the user can
> navigate (and select) sub nodes.

> The problem is that the DragOver event enables the user to expand the
entire
> tree by moving the dragged item over every node. As the mouse moves down
the
> treeview will scroll down as appropriate to the very last node. When the
> user goes to scroll back up the treeview - it won't move. You are stuck at
> the topmost visible node.

> How can I get the entire treeview to scroll back up to the very top of the
> tree during the DragOver event?

> Thanks
> Bill Wood



Sat, 20 Nov 2004 11:52:00 GMT  
 TreeView - Unable to scroll up when DragOver occurs
I have a wrapper class that does exactly what you want plus includes
an Auto-Expand of parent nodes when Drag pauses over a node. Goto:-

<http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=344...>

Hope this helps!

Graeme



Quote:
>I have a treeview that has code in the DragOver and DragDrop events.
>The DragDrop event accepts a new node into the treeview when the source has
>been a node from another treeview.
>The DragOver event code changes the SelectedItem to the node that is located
>via the HitTest(x,y) method, it also expands the node so the user can
>navigate (and select) sub nodes.

>The problem is that the DragOver event enables the user to expand the entire
>tree by moving the dragged item over every node. As the mouse moves down the
>treeview will scroll down as appropriate to the very last node. When the
>user goes to scroll back up the treeview - it won't move. You are stuck at
>the topmost visible node.

>How can I get the entire treeview to scroll back up to the very top of the
>tree during the DragOver event?

>Thanks
>Bill Wood



Sat, 20 Nov 2004 14:07:26 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Pop-ups in TreeView

2. scroll-events from a treeview-control

3. Scroll the TreeView When Dragging and Dropping a Node

4. VB.Net: Horizontal Scroll Bar In TreeView

5. Scrolling TreeView using API

6. Scrolling treeview using API

7. Auto Scroll a Treeview control

8. Treeview Scroll Event

9. Program control of horizontal scrolling of treeview

10. TreeView Horiz Scroll Bar

11. Scrolling a Treeview on drag n drop

12. Treeview, scroll to newly added/selected nodes?

 

 
Powered by phpBB® Forum Software