Hello everybody,
i have a small programm that has a treeview and a datagridview. i can drag and drop names from the grid to tree. the tree has alot of nodes and some of them have alot of children.
when i move a name to the tree i let the selected node expand, so i dont have to choose the destination note before start draging.
since the expanding is so fast i almost cant drag to the note i want because all childnotes expand as soon i hit the parent node.
so what i want to ask you:
is there any way to slow down the expand, having a short delay like windows explorer would be awesome :-)
thanks in advance!
greeting alex (germany)

vivek kulkarni132 reputationPosted Mar 31, 2009, 5:16 AM EDT
Hi,
You can add a delay in the
BeforeExpand event of the tree view control.
Thank you,
Alexander5 reputationPosted Mar 31, 2009, 5:22 AM EDT
Thank you for your answer, i know that this is the right place to do something, but i dont know what :-)
Since the action must stop / break as soon as i move over to another node, i cant pause there or something else.
:-/
alex
vivek kulkarni132 reputationPosted Mar 31, 2009, 5:51 AM EDT
Hi,
add a
System.Threading.Thread.Sleep(1000)
Thank you,
Alexander5 reputationPosted Mar 31, 2009, 12:01 PM EDT
I thank you again for your interest.
But if i would do that, the node would expand anyway after a second even if i moved already to another node :-)
Greetings Alex
vivek kulkarni132 reputationPosted Apr 1, 2009, 1:36 AM EDT
Hi,
You should use the
TreeView1.CollapseAll() method.
Thank you,