YOUSEFUL / DELPHI / COMPONENTS

TAtlasGraphNode

A graph node as returned by TAtlasGraph: ID, caption and rectangle.

Record Unit Atlas.Graph · Product Atlas VCL

Description

Returned by TAtlasGraph.Node and Nodes as a copy; changing it does not change the graph.

Members

MemberKindWhat it does
IDfieldStable node ID, 1 or more.
CaptionfieldText drawn in the node.
BoundsfieldRectangle 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.

pascal
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;

TAtlasGraph · TAtlasGraphEdge

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