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

# TControlScrollBar.ClientSize

Gets the size for the scroll bar based on the client area in the associated control.

## Declaration

Source position: forms.pp line 153

`public function TControlScrollBar.ClientSize: Integer;`

## Function result

Size from the client area in the associated control.

## Description

ClientSize is an Integer function used to get the size from the client area in the associated control. ClientSize uses the value in Kind to determine whether the height or width for the associated control is used as the return value. For example:

sbVertical
  Returns the client width from the associated control.
sbHorizontal
  Returns the client height from the associated control.

ClientSize is used in methods like ClientSizeWithBar and ClientSizeWithoutBar to get the size for the scroll bar adjusted for scroll bar spacing returned from GetSystemMetrics.

## See also

TControlScrollBar.Kind |  | The orientation for the scroll bar: horizontal or vertical.
TControlScrollBar.FControl |  | The associated TScrollingWinControl instance.
TControlScrollBar.ClientSizeWithBar |  | Calculates the size of the associated control when the scroll bar is Visible.
TControlScrollBar.ClientSizeWithoutBar |  | Calculates the size of the associated control when the scroll bar is not Visible.