473,408 Members | 2,839 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,408 software developers and data experts.

Disable double click expand and contract treeview

Hi there,

I have an ms access form and have used treeview within it.
When somebody double clicks on the node it opens a separete window for the information of that Node. But due to default setting treeview automatically Expands ot Contracts for that that node.

What I want to do is once double click it should show the new form but should not Expand or contract the node.

Please help,
thanks
Aug 13 '07 #1
2 11521
FishVal
2,653 Expert 2GB
Hi there,

I have an ms access form and have used treeview within it.
When somebody double clicks on the node it opens a separete window for the information of that Node. But due to default setting treeview automatically Expands ot Contracts for that that node.

What I want to do is once double click it should show the new form but should not Expand or contract the node.

Please help,
thanks
Hi there.

You can try to force expanded node to collapse back (and vice versa) by setting Node.Expanded property to opposite value in DblClick event handler. Smthng like this.
Expand|Select|Wrap|Line Numbers
  1. With Me![The name of Treeview OLE Control].Object.SelectedItem
  2.        .Expanded = Not .Expanded
  3. End With
  4.  
Aug 13 '07 #2
Hi there.

You can try to force expanded node to collapse back (and vice versa) by setting Node.Expanded property to opposite value in DblClick event handler. Smthng like this.
Expand|Select|Wrap|Line Numbers
  1. With Me![The name of Treeview OLE Control].Object.SelectedItem
  2.        .Expanded = Not .Expanded
  3. End With
  4.  
Thanks friend,

It works,
Aug 13 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Brian Smith | last post by:
Is there a way to avoid the default action of TreeNode expansion/contraction caused by double click? I can add an event handler to pop up my properties dialog on double click, but it has the...
1
by: Saradhi | last post by:
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...
4
by: Karim El Jed | last post by:
Hi, I'm trying to expand a special Node of my TreeView from Codebehind. I have a TreeView on a page for navigating to another site. On the other tsite here is the same TreeView more precisely a...
0
by: jim | last post by:
Hi, I have a TreeView control that sits on the MasterPage. All of my other webpages inherit from that Master Page. The Treeview receives it's data using an XMLDataSource that has it's DataFile...
11
by: Nospam | last post by:
I don't know what it is I am doing wrong, I am trying to get the menus to either expand or contract based on their previous states, i.e if already expanded if clicked again contract, and if...
2
by: pbd22 | last post by:
Hi. Can somebody tell me how to prevent a postback when I click on the little "plus" sign next to the treenode's root folder? It postbacks and I have to restart a video stream coming to the...
2
by: selvakumari | last post by:
Hi, i am new to C#, i have a multiselection treeview, where if i select a nodes with ctrl and shift corresponding nodes will be copied to another treenode, i want to unselect the...
4
by: Marcolino | last post by:
Hi I have a little problem with Treeview expand. So I'll try to explain. I Have one node and some subnodes like this +Nodes1 |------Subnodes 1 |------Subnodes 2 +Nodes2
0
by: Navid | last post by:
Hello, I have a tree view which has Check Box's beside each node. In the BeforeCheck event Handler I have canceled the event to prevent the user from Checking/ Un-checking the box: private void...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.