Sign in Join
FPDoc Onlineexperiment

TControlChildSizing class

In unit Controls

Provides settings to layout child-controls into a grid (table) layout.

Declaration

pascal
TControlChildSizing = class(TPersistent)

Inheritance

  1. TControlChildSizing
  2. TPersistent
  3. TObject

Description

TControlChildSizing is a TPersistent descendant which provides properties and methods used to layout, align, and resize child controls fitting into a grid on their parent control.

TControlChildSizing also provided "Spacing" settings. Those are applied to the grid and also to anchored or aligned controls outside the grid.

Layout and ControlsPerLine control if the grid is used, how it is sized and in which order the child-controls are placed into the grid.

EnlargeHorizontal, EnlargeVerticalHorizontal, ShrinkHorizontal, ShrinkVerticalHorizontal define how the cells of the grid are sized. Child-controls are then adjusted to that size depending on their BorderSpacing.CellAlignHorizontal/CellAlignVertical properties.

HorizontalSpacing, VerticalSpacingHorizontalSpacing, LeftRightSpacing, TopBottomSpacing can be used to add space between and around the cells.

See TChildControlResizeStyle and TControlChildrenLayout for details about the enumeration values used in the properties.

Additional information about child sizing and layout can be found on the Lazarus Wiki at:

Autosize / Layout (https://wiki.lazarus.freepascal.org/Autosize_/_Layout)

LCL AutoSizing (https://wiki.lazarus.freepascal.org/LCL_AutoSizing)

See also

Properties

ControlpublicThe Control where the class instance is used.
LeftRightSpacingpublishedMinimum distance between the left or right edge for the Control and the left or right edge for a child control.
TopBottomSpacingpublishedMinimum distance between the top or bottom edge of a Control and the top or bottom edge for a child control.
HorizontalSpacingpublishedMinimum space between child controls which are horizontally adjacent.
VerticalSpacingpublishedMinimum space between child controls which are vertically adjacent.
EnlargeHorizontalpublishedIndicates how child controls are expanded and aligned horizontally on the parent Control.
EnlargeVerticalpublishedIndicates how child controls are expanded or aligned vertically on the parent Control.
ShrinkHorizontalpublishedIndicates how child controls are shrunk and aligned horizontally on the parent Control.
ShrinkVerticalpublishedIndicates how child controls are shrunk and aligned vertically on the parent Control.
LayoutpublishedIndicates the layout direction used when child controls are resized and arranged into rows and / or columns.
ControlsPerLinepublishedThe number of controls displayed per column or row for the orientation / fill direction specified in Layout.

Methods

ChangeprotectedNotifies the Control of the child sizing changes and signals the OnChange event handler.
CreatepublicConstructor for the class instance.
AssignpublicCopies property values from the specified persistent object into the current class instance.
AssignTopublicCopies property values from the current class instance to the specified persistent object.
IsEqualpublicDetermines whether the specified sizing contains the same values as the current class instance.
SetGridSpacingpublicSets spacing properties in the class instance to the specified value.

Events

OnChangepublicEvent handler signalled when the size or layout for child controls has been changed.

Inherited

From TPersistent (7)

DefineProperties Destroy FPOAttachObserver FPODetachObserver FPONotifyObservers GetNamePath GetOwner

From TObject (40)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.