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

# AdjustBorderSpace

Adjusts the border space around the control to the client rectangle.

## Declaration

Source position: controls.pp line 2772

`procedure AdjustBorderSpace(`
`var RemainingClientRect: TRect;`
`var CurBorderSpace: TRect;`
`Left: Integer;`
`Top: Integer;`
`Right: Integer;`
`Bottom: Integer`
`); procedure AdjustBorderSpace(`
`var RemainingClientRect: TRect;`
`var CurBorderSpace: TRect;`
`const Space: TRect`
`);`

## Arguments

`RemainingClientRect` |  | TRect instance with the unused client area in a control.
`CurBorderSpace` |  | TRect instance with the space reserved for borders on the corresponding edges of a control.
`Left` |  | Space reserved on the left edge of the client area.
`Top` |  | Space reserved on the top edge of the client area.
`Right` |  | Space reserved on the right edge of the client area.
`Bottom` |  | Space reserved on the bottom edge of the client area.

## Arguments

`RemainingClientRect` |  | TRect instance with the unused client area in a control.
`CurBorderSpace` |  | TRect instance with the space reserved for borders on the corresponding edges of a control.
`Space` |  | TRect instance with the border space reserved on the corresponding edges of a control.

## Description

AdjustBorderSpace is an overloaded routine used to determine the space reserved for borders on the corresponding edges of a control. AdjustBorderSpace is called from methods in a widgetset class when the its bounds and constraints are realized and child controls are aligned to the new dimensions.

The overloaded variants allow the border spaces to be specified as individual Integer values or passed in a TRect instance.