YOUSEFUL / DELPHI / COMPONENTS
TAtlasGraphNode
A graph node as returned by TAtlasGraph: ID, caption and rectangle.
Description
Returned by TAtlasGraph.Node and Nodes as a copy; changing it does not change the graph.
Members
| Member | Kind | What it does |
|---|---|---|
ID | field | Stable node ID, 1 or more. |
Caption | field | Text drawn in the node. |
Bounds | field | Rectangle in diagram pixels; TopLeft is what AddNode and MoveNode set. |
Fields
ID field
ID: Integer;Stable node ID, 1 or more.
Caption field
Caption: string;Text drawn in the node.
Bounds field
Bounds: TRectF;Rectangle in diagram pixels; TopLeft is what AddNode and MoveNode set.
Examples
List the nodes
One line per node with its position.
uses System.SysUtils, Atlas.Graph;
function NodeSummary(Graph: TAtlasGraph): string;
var
Node: TAtlasGraphNode;
begin
Result := '';
for Node in Graph.Nodes do
Result := Result + Format('%d %s at %.0f, %.0f', [Node.ID, Node.Caption, Node.Bounds.Left, Node.Bounds.Top]) + sLineBreak;
end;
Related
Also in Atlas VCL
TAtlasTable · TAtlasGrid · TAtlasValueEdit · TAtlasTree · TAtlasWorkbook · TAtlasSheetGrid · TAtlasPivot · TAtlasInspector · TAtlasRichEdit · TAtlasSpellChecker · TAtlasChart · TAtlasGauge · TAtlasThemer · TAtlasWizard · TAtlasWorkspace · TAtlasCommandBar · TAtlasActionTile · TAtlasTileBoard · TAtlasNavigation · TAtlasMap · TAtlasGraph · TAtlasDiagram · TAtlasPrintDocument · TAtlasSchedule · TAtlasScheduler · TAtlasTaskPlan · TAtlasGantt · TAtlasPdfDocument · TAtlasPdfViewer