[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Controls' (#lcl)

# TControlChildSizing.TopBottomSpacing

Minimum distance between the top or bottom edge of a Control and the top or bottom edge for a child control.

## Declaration

Source position: controls.pp line 1989

`published property TControlChildSizing.TopBottomSpacing : Integer read FTopBottomSpacing write SetTopBottomSpacing default 0;`

## Description

TopBottomSpacing is an Integer property with the number of pixels reserved as spacing between child controls and the top and bottom edges of the Control. For example: When TopBottomSpacing is set to 5 for a Control, the Top property for a child control starts at 5.

The default value for the property is 0 (zero) and indicates that no additional space is reserved on the corresponding edges of the Control. Changing the value for the property causes the Change method to be called to resize/realign child controls. The OnChange event handler is also signalled (when assigned).

TopBottomSpacing also affects control alignment when using Anchors for positioning child controls on a parent.

Use VerticalSpacing to reserve space between vertically adjacent child controls in a column on the tabular Layout.

Use LeftRightSpacing to reserved space on the left and right edges of the Control.

## See also

TControlChildSizing.Change |  | Notifies the Control of the child sizing changes and signals the OnChange event handler.
TControlChildSizing.OnChange |  | Event handler signalled when the size or layout for child controls has been changed.
TControlChildSizing.Layout |  | Indicates the layout direction used when child controls are resized and arranged into rows and / or columns.
TControlChildSizing.ControlsPerLine |  | The number of controls displayed per column or row for the orientation / fill direction specified in Layout.
TControlChildSizing.VerticalSpacing |  | Minimum space between child controls which are vertically adjacent.
TControlChildSizing.LeftRightSpacing |  | Minimum distance between the left or right edge for the Control and the left or right edge for a child control.