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
1 answer

Delete checked node in a Tree view c#

I have a tree with multiple nodes with different depth. So I need to use the check boxes for deleting nodes not the selection method.
M.Ghandour
  • 93
  • 2
  • 12
0
votes
1 answer

php display multilevel treenode menu recursive

I have a post regarding this which was answered though I now have a different problem related to the same topic. You may want to reference here for the original question. php display multilevel treenode menu Now that the array is displaying by…
basagabi
  • 4,900
  • 6
  • 38
  • 84
0
votes
1 answer

php display multilevel treenode menu

How do I display this structure into a multi-level menu? Here's the structure: array 0 => array 'product_category_code' => string 'bracelets' (length=9) 'product_category_desc' => string 'Bracelets' (length=9) 'parent_node'…
basagabi
  • 4,900
  • 6
  • 38
  • 84
0
votes
2 answers

Printing Binary Search Tree in-order Traversal

I've created a program that stores integers from user input in a binary search tree and I have recursive functions for pre, post and in-order traversals that work fine. What I'm trying to do is traverse the tree in-order and at each node I want to…
user3415930
  • 1
  • 1
  • 1
  • 2
0
votes
1 answer

Are tree data structures usually defined in terms of nodes or subtrees?

I'm studying tree traversal algorithms by writing a tree library for Ruby. In terms of basic architecture, there seem to be two reasonable choices; There exist only trees. Trees have a root value, and sub-trees. There exist trees and nodes. A node…
Alex Altair
  • 3,246
  • 3
  • 21
  • 37
0
votes
1 answer

How to get tree node selected in a TreeNode structure in ZK?

I have created a tree depending upon the number of parent nodes and children nodes of a selectedData but after rendering the tree I don't know the node of the selecteddata which I have to make selected byDefault. So how could I search the required…
jaideep
  • 1,631
  • 17
  • 19
0
votes
2 answers

How to find node with max number of children and return that number?

I need to write a function that finds a node with the most children and return the number of children. The function should have a pointer to the root of a tree as input. Can someone provide a possible pseudocode for this function? I'm getting…
user2264035
  • 565
  • 1
  • 7
  • 13
0
votes
3 answers

C# TreeNode control, how do I run a program when node is clicked?

I'm creating an application launcher for our company and I would like to use the TreeNode control (we have 100s of network applications that need a structure), when a user clicks a Node (Example: Application 1) then I would like to run the program…
Jamie
  • 2,465
  • 10
  • 28
  • 31
0
votes
2 answers

Java JTree get name of selected node

I would like to find out how to get the name of the selected node in a JTree, not the userObject which is the text of the treenode. I have manually created several tree nodes and I need to determine which one is selected by the node's…
xrandr
  • 37
  • 2
  • 8
0
votes
1 answer

d3.js collapsible force layout with all the nodes collapsed

I've been trying to implement a directed force layout using a json file that I've written. Before I tried to make it begin with all nodes collapsed, it was working properly. I've declared a property called "index" for all the nodes, indicating which…
user3154169
  • 1
  • 1
  • 4
0
votes
1 answer

Adding Duplicate TreeNode Names to new branch where Nodes Contain Different Values

I have already filtered out Tree-nodes into a list that contain the same Node Name with "IsDuplicateNodeName"[1]. I want to add the nodes from that lists into a child node with the same Children Name being expandable showing all the children with…
Adam
  • 490
  • 7
  • 21
0
votes
1 answer

TreeNode.Add() doesn't show any response

i have a class that starts with a variable of type TreeNode in System.Windows.Forms. The class's functions job is to add some nodes to this variable .. but the problem is when i try to add some nodes to it the debugger freeze up and doesn't show any…
Ibrahim Amer
  • 1,147
  • 4
  • 19
  • 46
0
votes
3 answers

XmlReader How to read properly?

what is the best way to read xml like this one:
Georgi
  • 519
  • 4
  • 19
0
votes
1 answer

Trying to replace HTML by cloning nodes but getting strange results

I'm trying to add tags to acronyms found on a website. I'm running this as a Chrome Extension but I'm fairly certain the problem is within the javascript itself and doesn't have much to do with the Chrome stuff (I'll include the source just…
mast
  • 167
  • 1
  • 10
0
votes
1 answer

Dynamically increasing tree node width

DefaultMutableTreeNode treeNode=new DefaultMutableTreeNode("View"); DefaultMutableTreeNode p1 = new DefaultMutableTreeNode("node-1"); DefaultMutableTreeNode p2 = new DefaultMutableTreeNode("node-2"); DefaultMutableTreeNode p3 = new…
Prasad
  • 17
  • 5