Skip to main content

Overview

The TTreeExplorerAlignChild class provides the classic Windows Explorer tree layout, where child nodes are positioned to the right of their parent nodes, creating a familiar hierarchical structure.
This is the default child manager for TeeTree components.

Class Reference

TTreeExplorerAlignChild

Base class for Explorer-style layouts. Positions children to the right of parent nodes with vertical stacking.

Properties

Integer
default:"19"
Horizontal spacing between parent and child nodes in pixels.
Integer
default:"1"
Vertical spacing between sibling nodes in pixels.
Integer
default:"5"
Horizontal margin for the cross-box (expand/collapse control) in pixels.
Integer
default:"2"
Default top position for root nodes in pixels.

Layout Behavior

The Explorer layout algorithm:
  1. Root nodes - Positioned vertically at the left edge of the tree
  2. Child nodes - Indented horizontally to the right of their parent
  3. Siblings - Stacked vertically with VertMargin spacing
  4. Connections - Drawn as angled lines from parent to children

Visual Description

Usage

Setting Explorer Layout

Customizing Margins

Creating a Basic Tree

Right-Aligned Explorer

TTreeExplorerAlignRight

A variant that positions children to the left of parents, creating a right-to-left explorer layout.

Visual Description (Right-Aligned)

Connection Drawing

The Explorer layout draws connections with:
  • From point - Right edge of parent node
  • To point - Left edge of child node
  • Style - Angled connector lines with horizontal and vertical segments
  • Auto-positioning - Connections update automatically when nodes move

Common Use Cases

File Systems

Perfect for displaying hierarchical folder structures and file explorers.

Organization Charts

Display company hierarchies with departments and employees.

XML/JSON Viewers

Show nested data structures with expandable nodes.

Decision Trees

Create decision flowcharts with sequential branching.