Overview
TheTTreeTopBottomAlignChild class arranges child nodes vertically below their parent, with siblings distributed horizontally and centered under the parent node.
Class Reference
TTreeTopBottomAlignChild
Positions children vertically below parent nodes, with horizontal centering.This class is defined in the
TreeChildManagers unit.Properties
Horizontal spacing between sibling nodes in pixels.
Vertical spacing between parent and child nodes in pixels.
Vertical margin for the cross-box (expand/collapse control) in pixels.
Connection offset from the target shape in pixels.
Layout Behavior
The vertical layout algorithm:- Y Position - Children are positioned
VertMarginpixels below parent’s bottom edge - X Position - Siblings are centered horizontally under parent’s X center
- Spacing - Siblings separated by
HorizMarginpixels - Connections - Vertical connector with horizontal distribution to children
Visual Description
Usage
Setting Vertical Layout
Customizing Spacing
Creating an Organization Chart
Connection Style
The vertical layout draws connections with:- Main line - Vertical from parent’s bottom edge
- Branch point - Midpoint between parent and children
- Horizontal distribution - Lines extend horizontally to each child
- Entry point - Connects to top edge of child nodes
Connection Points
The layout automatically creates connection points:- Start at parent’s bottom edge, horizontally centered
- Extend vertically by
VertMargin / 2 - Branch horizontally to each child’s X center
- Extend to child’s top edge with
ToShapeOffset
Common Use Cases
Organization Charts
Classic top-down company and team hierarchies.
Family Trees
Genealogical charts with parent-child relationships.
Tournament Brackets
Sports tournaments and competition structures.
Classification Trees
Taxonomies and categorization hierarchies.
Centering Algorithm
The vertical layout calculates child positions to center them under the parent:Tips
Comparison with Other Layouts
| Feature | Vertical | Horizontal | Explorer |
|---|---|---|---|
| Expansion Direction | Downward | Rightward | Rightward |
| Child Alignment | Centered | Centered | Sequential |
| Default VertMargin | 32 | 8 | 1 |
| Default HorizMargin | 8 | 32 | 19 |
| Best For | Org charts | Flows | File trees |
Related Classes
- Explorer Layout - Traditional hierarchical layout
- Horizontal Layout - Left-to-right expansion
- Circular Layout - Radial arrangement
- Custom Layout - Create your own layout algorithm
