protected void GenerateTree()
{
n = new TreeAppNode();
n.Editable = false;
n.Selectable = true;
goView1.ObjectSingleClicked += new GoObjectEventHandler(this.goView1_ObjectSingleClicked);
n.LabelSpot = GoObject.Middle;
n.Text = "";
n.Shape = new GoRoundedRectangle();
tr = new GoXmlBindingTransformer("node", n);
tr.TreeStructured = true;
tr.TreeLinkPrototype = new GoLink();
tr.TreeLinksToChildren = true;
tr.AddBinding("label", "Text");
doc = goView1.Document;
rdr = new GoXmlReader();
rdr.AddTransformer(tr);
rdr.RootObject = goView1.Document;
using (StreamReader file = new StreamReader(fileToLoad))
{
rdr.Consume(file);
}
layout = new GoLayoutTree();
layout.Document = doc;
goView1.Dock = DockStyle.Fill;
// other customizations are described in the GoLayout User Guide
layout.PerformLayout();
}
The code above draws my graph from an xml file i have. Every node is expandable/contractble. How can you specify on loading the graph that a certain node be collapsed.?
Also, i have a massive subgraph in one of my nodes. It takes up a lot of space. If i minimise it, space in the graph is freed, but the graph doesnt resize to consume the space? Is this possible
thanks