Specifies the owner of the node. Change the Graph property to move the node from one graph to another (it loses all of its edges though since the other nodes stay in the old graph).
Namespace: GGraph
Delphi
|
published
property Graph: TGCustomGraph read FGraph write SetGraph;
|
Property Value
Type: TGCustomGraph
The following example prints the names of all the nodes that Node1 points to (assumes directed graph):
Delphi
|
var
i: Integer;
begin
if Node1.Graph.Directed then
for i := 0 to Node1.EdgeCount - 1 do
ListBox1.Items.Add( '--> ' + Node1.Edge[i].ToNode.Caption )
else
for i := 0 to Node1.EdgeCount - 1 do
if Node1.Edge[i].FromNode = Self then
ListBox1.Items.Add( '--> ' + Node1.Edge[i].ToNode.Caption )
else
ListBox1.Items.Add( '--> ' + Node1.Edge[i].FromNode.Caption )
end;
|