Questions tagged [treenode]

The base element of a hierarchical tree-like data structure.

Trees are hierarchical data structures that represent undirected acyclic graphs. A tree is therefore composed of connected nodes.

One specific node is the root of the tree. The root node is connected to several nodes (sometimes called children), each of these being the root of a subtree, and so-on. A node of a tree that does not have any children is called a leaf. All nodes of the tree are connected directly or indirectly to the root.

Treenodes are usually recursive datastructures.

See also:

Specific usages:

  • In .Net framework a TreeNode is a node in TreeView UI control that displays tree-like objects.
  • In Java a TreeNode is an interface that nodes of a JTree UI control that displays tree-like objects.
630 questions
3
votes
3 answers

TreeNode Image Overlay

I have an imagelist of about 30 images, and 3 images I'd like to be able to overlay on top of the 30 when a TreeNode is in a particular state. I know that a C++ TreeItem can do this with the TVIS_OVERLAYMASK as…
Sam Trost
  • 2,173
  • 20
  • 26
3
votes
1 answer

user object with TreeNode in C#

Can i tie a user object to a TreeNode in C#?
user34537
3
votes
1 answer

TreeView adding and sorting

I have treeView sorted in my Autodesk Revit and I would like to show it same way in my windows form. At this time I was able to extract it just the way it looks in Revit (print log), but i cant figure out how to add it. Here's what I've done so…
Mbanch
  • 98
  • 6
3
votes
1 answer

Adding nodes to TreeView causes Thread-Exception

i have a little problem. I´ve made a class that manages my prefabs (predefined objects for my level-editor). On loading the prefabs at start, it creates TreeNodes for categories and each prefab and adds it to an TreeView that it knows by the…
SharpShade
  • 1,761
  • 2
  • 32
  • 45
3
votes
4 answers

Adding a node to a complete tree

I'm trying to make complete tree from scratch in C++: 1st node = root 2nd node = root->left 3rd node = root->right 4th node = root->left->left 5th node = root->left->right 6th node = root->right->left 7th node = root->right->right where the tree…
3
votes
1 answer

How can I get the current node selected in a TreeView control?

When I use the MouseClick event of a treeview control always the first node in the tree is selected. What should I do to get the current node selected by the user? I am using C#. This is the code I am currently using: private void…
vikasse
  • 445
  • 2
  • 8
  • 20
3
votes
1 answer

Ext.js Editable TreeNodes

Is is possible to make TreeNodes (i.e. folders) editable by the user? I see that there's an option called editable in TreeNode class but I couldn't get it working or find any examples on its usage. My other quest is to place an input box in nodes…
frbry
  • 499
  • 2
  • 12
  • 25
3
votes
3 answers

How can I control checkboxes in a .Net Forms.TreeView?

I have a .Net desktop application with a TreeView as one of the UI elements. I want to be able to multi-select that TreeView, only that isn't supported at all. So I'm adding check-boxes to the tree, My problem is that only some items are selectable,…
Keith
  • 150,284
  • 78
  • 298
  • 434
3
votes
2 answers

Umbraco 7 Multinode Treepicker xpath query root node parent of parent

I have Multinode Treepicker in Umbraco 7.4.1. I'm trying to find out how to set the picker to start from the parent of the parent of my current node. I'm also need the option to set the picker to start from the siblings of the parent of my current…
Jarufi
  • 308
  • 1
  • 12
3
votes
2 answers

TreeNode Creation Errors

I'm trying to use TreeNodes to create a Tree like structure in code. I'm not all that familiar with TreeNodes at all. I did some searching beforehand but I still don't feel like I understand exactly what I am doing. I am creating a Game in Unity…
3
votes
3 answers

Can a tree node be both a root node and a leaf node?

Can a tree node be both a root node and leaf node? If so, why? I understand that the root node is at Level 0 of the tree. I also understand that a leaf node is a tree node that has no children. So if a tree has a root node A and nothing else, would…
pyuntae
  • 742
  • 3
  • 10
  • 25
3
votes
2 answers

XPath select node by node, subnode and subsubnode condition

I would like to retrieve all nodes with a node, subnode and subsubnode condition applied I tried to receive it with this xpath command: xmlDoc.SelectNodes("//WorkItem[WorkItemType[text()='Product Backlog Item'] and…
Bruno Bieri
  • 9,724
  • 11
  • 63
  • 92
3
votes
1 answer

Can branches of a mindmap merge to another node?

I do lots of mindmaps recently and I often face a problem which is that I can't merge branches. Such as a node has branch1, branch2, branch3 and branch4, and I find branch3 and branch4 can tend to another node. But, it seems both MindNode and Xmind…
Wykay -z
  • 41
  • 1
  • 4
3
votes
2 answers

How to calculate depth of each node in Binary Search Tree?

My task is to calculate depth of each node and store it in 'depth' given in Node class. But I don't know how I should approach this task. I was looking for some example in the internet but haven't found any appropriate to my task. This is the code…
Gregg
  • 125
  • 1
  • 2
  • 11
3
votes
3 answers

c# Treeview Node with formatted text e.g. tabs & new lines

Is it possible (by using the stock c# TreeView) to have Multiline TreeNodes? Also, is it possible to add control characters to TreeNode's text e.g. '\t'? This same effect could also be achieved by adding columns to the TreeNode. is this possible?
TK.
  • 46,577
  • 46
  • 119
  • 147