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
0
votes
0 answers

Cannot set ImageIndex of own TreeNode inside constructor

I got two Classes One is derived from TreeView and the other from TreeNode: using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using…
Daniel M
  • 177
  • 1
  • 1
  • 13
0
votes
1 answer

ASP.NET Custom Treeview with custom TreeNode

I have a question regarding the ASP.NET 3.5 Treeview and Treenodes. I'd like to build a Treeivew that supports multistate checkbox. I actually would like 4 states - checked, unchecked, indeterminate (like a tri-state box - parent is tri-state, if…
AE.
  • 41
  • 2
  • 7
0
votes
0 answers

Accessing a parent node in a 234 or 2-3-4 Tree JAVA

I am in CSC 330 and we have a big project to create a 234 or 2-3-4 tree. I am currently working on my insert method. I have my while loop which moves through the tree but am stuck with a simple problem. When I am breaking up a 4-node how do I access…
0
votes
2 answers

Asp.net:TreeView and Index was out of range

I have a TreeView in my code (Tree1) and i am going to add nodes in depth , using my CreatTree() method. In Debug i understood that this line (Tree1.Nodes[i].ChildNodes.Add(new TreeNode(i.ToString()))) does not lead to adding a node to Tree so…
Sal-laS
  • 11,016
  • 25
  • 99
  • 169
0
votes
1 answer

When treeview data in c# is provided with filesystem, will it display server system files or local system files?

I created a treeview in asp.net web page and passed the file system as the nodes of the treeview.I would like to know, If the treeview is provided to display the file structure will it dispay my local system file structure or server machine file…
user1471194
  • 23
  • 1
  • 5
0
votes
1 answer

Tree, TreeNode parent and child

If I got it right, a Tree is normally one List with the elements in a specific order. The children are not in sub-lists of their own, they're all in the same list. So, I'm trying to create a Tree class, that contains TreeNodes (class) using a List…
user1121487
  • 2,662
  • 8
  • 42
  • 63
0
votes
1 answer

delete node in BST

I have problem with delete node function in BST. I tested all other function works fine but if i print tree after deleting an node it causes segmentation fault. Here is my code for deletion: struct Tree * findinorder (struct Tree *t) { while…
Abhi
  • 192
  • 1
  • 4
  • 17
0
votes
1 answer

c# WinForms Detect real visibility of TreeView

I have a WinForms TreeView and a tree, built from custom node objects which inherits TreeNode the problem is that these nodes can be displayed in only one tree at the time. Now I have multiple controls with a TreeView that should display these…
Tarion
  • 1
0
votes
1 answer

How to change background color of selected tree node?

I have a treenode which i create dynamically as described below: ->UK,->India ->Delhi ->Mumbai ->USA ->Russia I need to change the color of the node when i click on the node. As for eg if i click on delhi delhi should be highlighted, if russia…
Saiyam
  • 138
  • 2
  • 11
0
votes
0 answers

p:treeNode element is not getting displayed in primefaces

My requirement is to display the tree node element in the xhtml page. But the element is not displayed. Here is the code test.xhtml
Sriram
  • 19
  • 1
  • 1
  • 6
0
votes
1 answer

Updating NodeView cells in GTK#

How to make a NodeView cell retain the entered value after text's been entered through keyboard and the Edited event fired? Whenever I enter some text into the cell and try to confirm that change, the old value that was there before my editing comes…
Luka
  • 1,718
  • 3
  • 19
  • 29
0
votes
2 answers

Using recursively returned reference to node in tree does not allow changes to the node itself

My data structures class is working with trees. We are implementing a 3-ary tree, containing 2 values with a reference to a left, middle, and right node (left subtree is less than value 1, middle subtree is between value 1 and value 2, right subtree…
Feanor
  • 2,715
  • 4
  • 29
  • 43
0
votes
1 answer

Dojo: multiple right-click Menus on a large Tree

I am trying to define multiple right click Menus on a large Tree. ( using dojo 1.8). I've got 20+ different type of data items in the tree. For each of this data items type there is a specific right-click menu. I've tried to attach the Menu to the…
Zebulato
  • 1
  • 1
0
votes
1 answer

Java Wicket get wicket:id of treenode

In my Wicket application I use a Tree object. My goal is to show only one level at the same time, which means expanding the root node will hide the root node and display the first level of subnodes. Nodes without child nodes should also get a…
Alex
  • 223
  • 1
  • 6
  • 21
0
votes
2 answers

Treeview NavigateUrl absolut path sharepoint

I have a treeview of files and i need to download those files from another page. So Im setting the NavigateUrl to the downloadpage but im getting the currentpage path and downloadpages path. foreach (FileInfo file in currentDir.GetFiles()) …
Labrinths
  • 120
  • 1
  • 11