Treeview in C#

Posted on 2003-03-12
Medium Priority
Last Modified: 2008-03-17
I want to know how can i put my cursor automatically on a level of my treeview?


 | |
 | --LEVEL_1_1
 | |
 | -- (LEVEL_1_2)
 | |
 | |-LEVEL_2_1
 | |
 | --LEVEL-2-2

I want to place my cursor in "LEVEL_1_2"

Can you explain me these properties whose following:

-1) TreeView_1. Select
-2) TreeView_1. SelectedNode
-3) treeView_1. Parent

Question by:DrChal
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

mystar earned 60 total points
ID: 8118777
1 - TreeView_1.Select:when happens TreeView_1's nodes is selected with mouse.
2 - TreeView_1.SelectedNode:
when you click on TreeView_1's Nodes,
TreeView_1.SelectedNode set to selected node.
for example you have follow treeview:
name of treeview is:treeview1 and it's nodes are:
when you click each of nodes, selectedNode set to the node is selected.

3 - TreeView_1.Parent is Form.
 if you want to put your cursor on a level:
you must set TreeView_1.SelectedNode to a node that you want.


Author Comment

ID: 8118884
Thanks for your explanation.

Can you give me an example of source's code with selectedNode and Parent.


Expert Comment

ID: 8118930
if you have the following nodes
         - cars  +

         - train

Expert Comment

ID: 8141522

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month13 days, 17 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question