473,411 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

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

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
1 4632
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Fabiano Sidler | last post by:
Hello Newsgroup! In my Python script, I use the 'thread' module (not 'threading') and 'signal' simultaneously. All spawned threads execute 'pcapObject.loop(-1, callback)', which does not return....
0
by: Daniel O'Brien | last post by:
Hi - any help with this would be greatly appreicated - it has already had me confused for a good few hours! I am using Visual Studio 2003 and the .NET framework 1.1. I have a C# Windows...
4
by: Mark Stijnman | last post by:
A while ago I posted a question about how to get operator behave differently for reading and writing. I basically wanted to make a vector that can be queried about whether it is modified recently...
8
by: saif | last post by:
Hi all, I realy need your help. I have a page with different web links, now what I am trying to do is whenever a user clicks on a link that link is captured using event.target method. I'm...
2
by: Randy Starkey | last post by:
Hi, Can anyone point me in the right direction on this? Is there a way to expand and collapse all instances of this script on a single page? The script works well individually. I do the HTML...
12
by: RoSsIaCrIiLoIA | last post by:
On Mon, 07 Feb 2005 21:28:30 GMT, Keith Thompson <kst-u@mib.org> wrote: >"Romeo Colacitti" <wwromeo@gmail.com> writes: >> Chris Torek wrote: >>> In article <4205BD5C.6DC8@mindspring.com> >>>...
8
by: sathyashrayan | last post by:
/* ** PLURALTX.C - How to print proper plurals ** public domain - original algorithm by Bob Stout */ #include <stdio.h> #define plural_text(n) &"s"
3
by: Marco | last post by:
Hello there, We're new to C# and have noticed a strange behaviour which we don't yet understand. We wrote a COM DLL (in VC++ 6.0) which performs some calculation based on some double arrays...
4
by: Popoxinhxan | last post by:
I would like to develop the form which allow expanable similar to the window address book application. Which enable you to enter the keyword and press the search button then the main form expand...
0
by: SenthilVel | last post by:
Hi All I have problem in Stopping one of my windows service. My task is to stop is to stop all my windows services which beloings to my application. when doing so, i am able to stop all my...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.