Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Treeview in C#

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

Ex:

+-Master
 |
 +-+LEVEL_1
 | |
 | --LEVEL_1_1
 | |
 | -- (LEVEL_1_2)
 |
 +-+LEVEL_2
 | |
 | |-LEVEL_2_1
 | |
 | --LEVEL-2-2
 |
 +-LEVEL_3
 

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

Thanks
0
Comment
Question by:DrChal
  • 2
4 Comments
 

Accepted Solution

by:
mystar earned 60 total points
ID: 8118777
Hello.
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:
 -Parent
   child1
   child2
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.

 
0
 

Author Comment

by:DrChal
ID: 8118884
Thanks for your explanation.

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

Thanks
0
 

Expert Comment

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

         - train
0
 

Expert Comment

by:mystar
ID: 8141522
thanks
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

577 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