TControlChildSizing class
Provides settings to layout child-controls into a grid (table) layout.
Declaration
TControlChildSizing = class(TPersistent)Inheritance
- TControlChildSizing
- TPersistent
- 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
Control | public | The Control where the class instance is used. |
LeftRightSpacing | published | Minimum distance between the left or right edge for the Control and the left or right edge for a child control. |
TopBottomSpacing | published | Minimum distance between the top or bottom edge of a Control and the top or bottom edge for a child control. |
HorizontalSpacing | published | Minimum space between child controls which are horizontally adjacent. |
VerticalSpacing | published | Minimum space between child controls which are vertically adjacent. |
EnlargeHorizontal | published | Indicates how child controls are expanded and aligned horizontally on the parent Control. |
EnlargeVertical | published | Indicates how child controls are expanded or aligned vertically on the parent Control. |
ShrinkHorizontal | published | Indicates how child controls are shrunk and aligned horizontally on the parent Control. |
ShrinkVertical | published | Indicates how child controls are shrunk and aligned vertically on the parent Control. |
Layout | published | Indicates the layout direction used when child controls are resized and arranged into rows and / or columns. |
ControlsPerLine | published | The number of controls displayed per column or row for the orientation / fill direction specified in Layout. |
Methods
Change | protected | Notifies the Control of the child sizing changes and signals the OnChange event handler. |
Create | public | Constructor for the class instance. |
Assign | public | Copies property values from the specified persistent object into the current class instance. |
AssignTo | public | Copies property values from the current class instance to the specified persistent object. |
IsEqual | public | Determines whether the specified sizing contains the same values as the current class instance. |
SetGridSpacing | public | Sets spacing properties in the class instance to the specified value. |
Events
OnChange | public | Event 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.
