By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,759 Members | 1,778 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,759 IT Pros & Developers. It's quick & easy.

Stopping Expand/Collpase behaviour whenever you double-click ona Tree Node

P: n/a
I am facing a problem with the TreeView in C#.
Whenever I double click on a TreeNode, I am opening another form. This works fine.
But the Treenode is getting expanded and collpased whenever I double click on that TreeNode.
Is there anyway to stop the expand/collapse bahaviour on the double click of a tree Node??

-SARADHI

Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Saradhi,

I would derive a class from the tree view class, and override the
WndProc method. In there, I would handle the windows message for the mouse
double click, and then have it call your function to open a form. If it is
not this message, then just call the base class implementation.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Saradhi" <up*******@inooga.com> wrote in message
news:OZ**************@TK2MSFTNGP15.phx.gbl...
I am facing a problem with the TreeView in C#.
Whenever I double click on a TreeNode, I am opening another form. This works
fine.
But the Treenode is getting expanded and collpased whenever I double click
on that TreeNode.
Is there anyway to stop the expand/collapse bahaviour on the double click of
a tree Node??

-SARADHI
Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.