How to select node(i.e go node) from tree view

i have tree view control that contains list tree nodes,on select tree node, that perticular go node is highlighted( selected) in goview.pls how to do that ?.one more thing remember not user selection go node,programatically need how to select go node from tree view.

ok… you need some way of connecting the TreeNode in the TreeView to the GoNode in the GoView.

One way is to use the GoNode unique id… make sure to set GoDocument.MaintainsPartID to true

so… when you are creating the GoNode and the corresponding TreeNode, you’d do something like this:

TreeNode tn = new TreeNode(text);
GoNode gn = new GoNode(); // I’m using GoNode generically here, this will work with any GoNode type
gn.Text = text;
tn.Tag = gn.PartID;

then… when the TreeNode is selected…

int id = (int)treenode.Tag;
GoNode gn = (GoNode)goview.Document.FindPart(id);
goview.Selection.Select(gn);

note… I’m just typing this code in here, I haven’t actually compiled or tested it.

This code is fine. how to highlight selection node as blue color. By default highlight selection node is black color is coming surrounded to the node.how to do that

It’s probably better if you start a new topic if you ask a new unrelated question…

Selection highlight (for Primary Selection) is typically lime green, so I’m not sure what you’re asking about…