Overview
TheTTreeLeftRightAlignChild class arranges child nodes horizontally to the right of their parent, with siblings distributed vertically and centered around the parent’s middle point.
Class Reference
TTreeLeftRightAlignChild
Positions children horizontally to the right of parent nodes, with vertical centering.This class is defined in the
TreeChildManagers unit.Properties
Horizontal spacing between parent and child nodes in pixels.
Vertical spacing between sibling nodes in pixels.
Horizontal margin for the cross-box (expand/collapse control) in pixels.
Connection offset from the target shape in pixels.
Layout Behavior
The horizontal layout algorithm:- X Position - Children are positioned
HorizMarginpixels to the right of parent’s right edge - Y Position - Siblings are centered vertically around parent’s Y center
- Spacing - Siblings separated by
VertMarginpixels - Connections - Horizontal connector with vertical distribution to children
Visual Description
Usage
Setting Horizontal Layout
Customizing Spacing
Creating a Horizontal Tree
Connection Style
The horizontal layout draws connections with:- Main line - Horizontal from parent’s right edge
- Branch point - Midpoint between parent and children
- Vertical distribution - Lines extend vertically to each child
- Entry point - Connects to left edge of child nodes
Connection Points
The layout automatically creates connection points:- Start at parent’s right edge, vertically centered
- Extend horizontally by
HorizMargin / 2 - Branch vertically to each child’s Y center
- Extend to child’s left edge with
ToShapeOffset
Common Use Cases
Flowcharts
Create left-to-right process flows and workflow diagrams.
Timeline Views
Display chronological events expanding to the right.
State Machines
Show state transitions in a horizontal layout.
Process Maps
Map business processes with horizontal expansion.
Comparison with Explorer Layout
| Feature | Explorer | Horizontal |
|---|---|---|
| Child X Position | Right of parent | Right of parent |
| Child Y Position | Below previous sibling | Centered around parent |
| Default HorizMargin | 19 | 32 |
| Default VertMargin | 1 | 8 |
| Best For | Hierarchies | Flows |
Tips
Related Classes
- Explorer Layout - Traditional hierarchical layout
- Vertical Layout - Top-to-bottom expansion
- Circular Layout - Radial arrangement
- Custom Layout - Create your own layout algorithm
