473,383 Members | 1,818 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,383 software developers and data experts.

How to get TreeNode from a Handle

If I have a "Handle" of a TreeNode, how can I refer to the treenode?
For example, if the treenode is tn then I want to get tn.Text or tn.Index.

In other words, TreeNode has its pointer property as Handle, how do I
crossreference?
--

Thanks for your help.

Harshad Rathod

Nov 16 '05 #1
1 2091
OOPS ! Asked just too early.

This is what I was looking for:
public static TreeNode FromHandle(
TreeView tree,
IntPtr handle
);


"Harshad" wrote:
If I have a "Handle" of a TreeNode, how can I refer to the treenode?
For example, if the treenode is tn then I want to get tn.Text or tn.Index.

In other words, TreeNode has its pointer property as Handle, how do I
crossreference?
--

Thanks for your help.

Harshad Rathod

Nov 16 '05 #2

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

Similar topics

6
by: Dean L. Howen | last post by:
Hi, I want to add some attributes to TreeNode, so I create a new class MyNode that inheritance from System.Windows.Forms.TreeNode, I want to TreeView use MyNode instead of TreeNode, so I can...
5
by: nevin | last post by:
Hi, If I have a TreeView with loads of Nodes and they all have children etc, how do I find the index of a given node when I only know the Text value? If I use TreeView.Nodes.IndexOf(new...
4
by: Patrick Noll | last post by:
hi ng, i have a problem when i try to change the text property of a TreeNode just before the user is able to edit this property. Example: // Label before anything happens... TreeNode.Text =...
1
by: Boni | last post by:
Dear all, I have a question about TreeView elements. is it possible to differentate double click on TreeNode itself from double click on "+" of this TreeNode? Thanks in advance, Boni
3
by: Matthew Woods | last post by:
Hi, does anyone know how to select a treenode with the first click? the first click on a treeview will highlight the node under the mouse when it was clicked BUT that node isn't actually selected...
3
by: Ian Semmel | last post by:
How do you change the color of the selected item (ie clicked) in a TreeView control ?
4
by: Rob Stevens | last post by:
Is there some sort of unique identifier in every treenode that is consistent? I was looking at the handle of every treenode, but it appears that the handle changes everytime the tree is built. ...
1
by: jmDesktop | last post by:
I am trying to add nodes with keys to my treeview. I can add general nodes without problem with: //create new node TreeNode newNode = new TreeNode(myIdNumber); //create children TreeNode...
1
by: AAaron123 | last post by:
If you see this posted twice - sorry. My news reader showed my first post as "No Longer Available" I have the following in a .css file. The treeNodes behave as if they were "a" elements. ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.