am reading this tutorial http://chalaki.com/how-to-program-msagl-glee-to-create-hierarchical-graph-layouts/519/
using the code sample.
am trying to make the attributes dynamic (i want to be able to load the attributes from a database later)
i have tried
string dColor = "Red";
string dShape = "Diamond";
Microsoft.Glee.Drawing.Node n2 = graph.FindNode(strNode2);
n2.Attr.Fillcolor = Microsoft.Glee.Drawing.Color.dColor;
n2.Attr.Shape = Microsoft.Glee.Drawing.Shape.dShape;
but its not working, how do i do this or even read about doing this dynamically?
[ANSWER] Am not sure if this is the best way,but it works.
--For Colors i did
using mColor = Microsoft.Msagl.Drawing.Color;
using sColor = System.Drawing.Color;
sColor c = sColor.FromName("Red");
graph.FindNode("test1").Attr.FillColor = new mColor(c.A,c.R,c.G,c.B);
--For the shape i did
graph.FindNode("test1").Attr.Shape = (Shape)
(int)Enum.Parse(typeof(Shape),"Diamond");
where "test1","diamond" and "Red" values come from the database.