473,769 Members | 6,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TreeView Plus Sign to Select Node?

I was trying to use the treeview and was wondering if there was a way to
make the treeview select the node when you click the plus sign next to it.
The only way I've found to do it is to actually click on the node name and
then it will show it selected. I'd like to change to selected when you
click the plus sign. Is this possible. Thanks
Nov 21 '05 #1
2 2686
"B-Dog" <bd***@hotmail. com> schrieb:
I was trying to use the treeview and was wondering if there was a way to
make the treeview select the node when you click the plus sign next to it.
The only way I've found to do it is to actually click on the node name and
then it will show it selected. I'd like to change to selected when you
click the plus sign.


\\\
Private Sub TreeView1_Expan dOrCollapse( _
ByVal sender As Object, _
ByVal e As TreeViewEventAr gs _
) Handles TreeView1.After Collapse, TreeView1.After Expand
Me.TreeView1.Se lectedNode = e.Node
End Sub
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2
Thanks, will try that!

Barclay

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:u8******** ******@tk2msftn gp13.phx.gbl...
"B-Dog" <bd***@hotmail. com> schrieb:
I was trying to use the treeview and was wondering if there was a way to
make the treeview select the node when you click the plus sign next to it. The only way I've found to do it is to actually click on the node name and then it will show it selected. I'd like to change to selected when you
click the plus sign.


\\\
Private Sub TreeView1_Expan dOrCollapse( _
ByVal sender As Object, _
ByVal e As TreeViewEventAr gs _
) Handles TreeView1.After Collapse, TreeView1.After Expand
Me.TreeView1.Se lectedNode = e.Node
End Sub
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4241
by: Jürgen Müllder | last post by:
Hi! I have a TreeView in my Application. I have the MouseDown Attached to the TreeView. When i click at a Node it makes that what it should. But when i Expand a Node by clicking at the Plus Sign the MouseDown gets fired and it runs the routine, what i don't want. Is there a way to find out if the expand sign was clicked? My Idea was to get a bool and a TreeNode in the class where i fetch the
2
1364
by: clsmith66 | last post by:
In a treeview, I am trying to store the index of every treenode as it expands in a hidden input box. If I click on the node itself, it expands and I can capture the node index no problem. If I click on the plus sign however, the selected index doesn't change so I can't capture the index of the newly expanded node. Does any one know how to change the selected node when a plus sign is clicked?
3
10152
by: Jan Wrage | last post by:
Hi! I would like to implement a treeview in my existing application. It should show my entire Active-Directory structure, i.e. all Groups, Containers and OUs. Could somebody help me with that. Im trying for about 3 hours but can't get it to work. Thank you!
13
9063
by: André Nogueira | last post by:
Hi there. I know you can view a node's fullpath property, but is it posible to select a node using its path? Like, tell the treeview that the node that should be selected is the node with the path "Users\Administrators\John Doe"? Thank you in advance! Andre Nogueira
8
4639
by: Shawn B. | last post by:
Greetings, I'm creating a little program that acts as a glorified Registry explorer. The TreeView doesn't allow you to show a plus sign unless a node has child nodes, so I need to determine whether a registry key has subkeys and add a dummy childnode. The way I'm doing this is to populate the child nodes as the parent is expanded. However, there are some serious performance implications. First, when I pouplate the HKEY_CLASSES_ROOT,...
2
7500
by: Tymbow | last post by:
I'm building a web application that is analogous to the Windows XP file explorer in function. The left column contains a TreeView, and the right column a DataGrid populated by selecting TreeView nodes. The TreeView populates dynamically as there are a significant number of nodes. The DataGrid displays both the items and the nodes from the TreeView. Using the explorer analogy this means the TreeView shows folders, and the DataGrid folders...
8
12776
by: Matt MacDonald | last post by:
Hi All, I have a form that displays hierarchical categories in a treeview. Ok so far so good. What I was to do is have users be able to select a node in the treeview as part of filling out the form. I only want to allow single selection, so using checkboxes is out of the question. It works as is, but it makes the form very cumbersome if every time that a user selects a node, the whole page has to reload. Is there a way to have a node...
2
5243
by: =?Utf-8?B?QU5V?= | last post by:
I have a tree view which i load completely at the time of my webpage load. When i click on the + signs of the parent nodes, it expands to show all of its children. Similarly, when i click on the node itself, it expands to show its children. It works fine but it is very slow as compared to clicking on + sign to load children. No other event or process runs in the background when i click on the node or the + sign of the folder image. In my...
2
2191
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
My first time using a TreeView: I've got a TreeView that I populated with some data and it has nodes. In the Properties window, I created an Event Handler for the TreeView's AfterSelect method, and it allows me to determine what Tree Node has been selected. However, if I expand the TreeView and select one of the Child TreeNodes, they do not trigger this event.
0
9590
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10223
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10051
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10000
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8879
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3968
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3571
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.