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

TControlBorderSpacing

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Describes the (minimum) spacing around a control.

Declaration

Source position: controls.pp line 817

type TControlBorderSpacing = class(TPersistent)

protected

  procedure Change(); virtual;

  

Invalidates the control and signals the OnChange event handler.

  function GetOwner; override;

  

Gets the class where the border spacing values are used.

public

  constructor Create();

  

Constructor for the class instance.

  procedure Assign(); override;

  

Copies property values from the specified persistent object.

  procedure AssignTo(); override;

  

Copies property value from the class instance to the specified persistent object.

  function IsEqual();

  

True when the specified spacing is the same as the current settings in the class instance.

  procedure GetSpaceAround(); virtual;

  

Returns the bounds with added Around space.

  function GetSideSpace();

  

The space on a control side including Around space.

  function GetSpace(); virtual;

  

Gets the value for the indexed Space property.

  procedure AutoAdjustLayout();

  

Automatically adjusts the size of the control using the specified proportions.

  property Control: TControl; [r]

  

The control to which this border spacing applies.

  property Space []: Integer; [rw]

  

Provides indexed access to the border spacing value for a given anchor side.

  property AroundLeft: Integer; [r]

  

Spacing reserved on the left-hand side of the control.

  property AroundTop: Integer; [r]

  

Space reserved on the top edge of the control.

  property AroundRight: Integer; [r]

  

Space reserved on the right-hand side of the control.

  property AroundBottom: Integer; [r]

  

Space reserved on the bottom edge of the control.

  property ControlLeft: Integer; [r]

  

Space reserved on the left-hand edge of the control relative to the position for the control.

  property ControlTop: Integer; [r]

  

Space reserved on the top edge of the control relative to the position for the control.

  property ControlWidth: Integer; [r]

  

Total width for the control including spacing values in Around, Left, and Right.

  property ControlHeight: Integer; [r]

  

Total height for the control including spacing values in Around, Top, and Bottom.

  property ControlRight: Integer; [r]

  

Space reserved on the right-hand edge of the control relative to the position for the control.

  property ControlBottom: Integer; [r]

  

Space reserved on the bottom edge of the control relative to the position for the control.

published

  property OnChange: TNotifyEvent; [rw]

  

Event handler for a change in border spacing.

  property Left: TSpacingSize; [rws]

  

The space at the left border.

  property Top: TSpacingSize; [rws]

  

The space at the top border.

  property Right: TSpacingSize; [rws]

  

The space at the right border.

  property Bottom: TSpacingSize; [rws]

  

The space at the bottom border.

  property Around: TSpacingSize; [rws]

  

The space to add on each side of a control.

  property InnerBorder: Integer; [rws]

  

Space added to the widget's preferred size

  property CellAlignHorizontal: TControlCellAlign; [rw]

  

The horizontal alignment inside a table cell.

  property CellAlignVertical: TControlCellAlign; [rw]

  

The vertical alignment inside a table cell.

end;

Inheritance

TControlBorderSpacing

  

Describes the (minimum) spacing around a control.

|

TPersistent,IFPObserved

|

TObject

Description

TControlBorderSpacing defines the spacing around a control. The spacing around its children and between its children is defined in TWinControl.ChildSizing.

Left, Top, Right, Bottom: Integer;
Defines the space available to the auto-sized control. For example: Control A lies left of control B. A has borderspacing Right=10 and B has borderspacing Left=5. Then A and B will have a minimum space of 10 between.
Around: Integer;
Same as Left, Top, Right and Bottom but specified all at once. This will be added to the effective Left, Top, Right and Bottom. Example: Left=3 and Around=5 results in a minimum spacing to the left of 8.
InnerBorder: Integer;
This is added to the preferred size. For example: A buttons widget returns 75x25 on GetPreferredSize. CalculatePreferredSize adds 2 times the InnerBorder to the width and height.
CellAlignHorizontal, CellAlignVertical: TControlCellAlign;
Used, for example, when the Parent ChildSizing.Layout defines a table layout.

Version 3.2 Generated 2024-02-25 Home