I have a GUI where I have a tree view in the left pane and a gridview in the right pane. When I select a treenode, I change the gridvoew to match the tree node and this was working fine.
Now I am trying to add drag and drop support and find that I get the AfterSelect event before SelectionDragStart event and so deselect the old view, select a new view and now I can't drag to where I was hoping to drag to.
What I would like to do is if the user used the mouse to start dragging a tree node is to not have that node selected but just dragged.
Is this possible or normal?
Thanks, Dave
I think the crux of this is how to allow DragStart to occur on MouseDown and node selected on MouseUp if there was no drag. Most of the tree examples select the node on mouse down but the grid sample explorer does not select till mouse up though I have not figured out why/how yet. Please offer your suggestions. Thanks, Dave
P.S. I implemented a ISelectionStrategyFilter based on SelectionStrategyExtendedAutoDrag but that does not seem to change anything. I did not add any custom code however and just return the base.OnMouseDown. I could find no doc on how/why to use that interface so don't know if it is even realted to my issue. I guess I was hoping the base class modified the behavior to what I was hoping for.
Thanks Brian but that does not work for me. I set that property to various settings, and in all cases, the events fire as: AfterActivate, AfterSelect on mouse down then SelectionDragStart when I nove the mouse while held down and so I have already changed views as a new node has been selected. WHat I want to happen is to get a DragStart when the mouse is down and moved and so I guess no activate or select until mouse up. Is this reasonable to want? How else would one start dragging a node without it being selected? Thanks, Dave
You should probably take a look at the UltraTree.Override.SelectionType property; I think in your case you want to set it to Extended/Single, i.e., not the values with 'AutoDrag' in their name.