GoDiagram Problem

Hello Sir,

I want to know that how can we show parent node in a cicle and child
node should be connect to arround this parent node in GoDiagram.
Sir please send answer as soon as possible because this very urgent
requairment.
Thanks
Yogendra

If I understand you correctly, you want to have a central node, with connected nodes in a circle around it. Something like this command will arrange the nodes around the selected node:

[code] GoNode parent = myView.Selection.Primary as GoNode;
if (parent != null) {
int num = 0;
foreach (IGoNode c in parent.Nodes) num++;
if (num > 0) {
PointF center = parent.Center;
int i = 0;
float radius = 150;
double angle = Math.PI*2/num;
foreach (IGoNode c in parent.Nodes) {
c.GoObject.Center = new PointF(center.X + radius * (float)Math.Cos(i * angle),
center.Y + radius * (float)Math.Sin(i * angle));
i++;
}
}
}[/code]

Hello Sir,
Can you tell me that at which event _handler should I writte this code.

GoNode parent = myView.Selection.Primary as GoNode;
if (parent != null) {
int num = 0;
foreach (IGoNode c in parent.Nodes) num++;
if (num > 0) {
PointF center = parent.Center;
int i = 0;
float radius = 150;
double angle = Math.PI*2/num;
foreach (IGoNode c in parent.Nodes) {
c.GoObject.Center = new PointF(center.X + radius * (float)Math.Cos(i * angle),
center.Y + radius * (float)Math.Sin(i * angle));
i++;
}
}
}
Thanks
Yogendra

If you generalize the code to take a GoNode, rather than assuming it just works on the selected node, you can use it at any time to arrange the children around any node.

Hello Sir,

Can u send a demo in which parent node in a cicle and child
node should be connect to arround this parent node in GoDiagram.
Sir please send answer as soon as possible because this very urgent
requairment.
Thanks
Yogendra