This project is read-only.

Navigating and Selecting TreeNode Problem

Sep 21, 2010 at 10:48 PM


I have a Tree structure as below.








I have access to the Root. but when i do Root.Nodes it says count is 0. When i expand the root and then do a Root.Nodes it gives me the correct count (which is 2) So the first problem is that i have to expand all the Tree first and then search it other wise it doesn't show anything

2- Second problem is which i do a nodeA.Select() it just selects the label of the node and doesn't check the checkbox ? how do you check the box of the node?

3- Third problem is The Labels of the Tree Nodes don't show up in the UI Automation tools like (UIA verify or UISpy) is there a way to check a node based on it's label text?


Thanks in Advance

Sep 24, 2010 at 9:31 AM


WPF or WinForm?


1. you can try the following to go the wanted TreeNode

on Tree


Tree tree = ...

tree.Node( "Root", "Node1", "NodeA");



on a Node


TreeNode root = .....

root.GetItem("Node1", "NodeA");



this will automatically expand the needed part of the tree.


2. is the CheckBox visible in UISpy/UIAVerify? it might be only an image depends on what the developer uses here.

3. the Name of the Node is what you search I think.