[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 700

type TControlBorderSpacing = class(TPersistent) end;

protected

  procedure Change(); virtual;

  

Invalidates the control, and invokes the OnChange handler.

public

  constructor Create();

  procedure Assign(); override;

  procedure AssignTo(); override;

  function IsEqual();

  

True if the specified spacing equals the current settings.

  procedure GetSpaceAround(); virtual;

  

Returns the bounds with added Around space.

  function GetSideSpace();

  

The space on a control side, including Around space.

  function GetSpace(); virtual;

  procedure AutoAdjustLayout();

  property Control: TControl; [r]

  

The control to which this border spacing applies.

  property Space []: Integer; [rw]

  

Kind of array access to the space at every side.

  property AroundLeft: Integer; [r]

  property AroundTop: Integer; [r]

  property AroundRight: Integer; [r]

  property AroundBottom: Integer; [r]

  property ControlLeft: Integer; [r]

  property ControlTop: Integer; [r]

  property ControlWidth: Integer; [r]

  property ControlHeight: Integer; [r]

  property ControlRight: Integer; [r]

  property ControlBottom: Integer; [r]

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 to every side's individual space.

  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.

Inheritance

TControlBorderSpacing

  

Describes the (minimum) spacing around a control.

|

TPersistent

?

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;
        minimum space left to the autosized 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 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 Parents.ChildSizing.Layout defines a table
        layout.
          
The latest version of this document can be found at lazarus-ccr.sourceforge.net.