[Up][Next] | Reference for unit 'Controls' (#lcl)

## The coordinates of a control can be specified or retrieved in various ways.

The following description applies to members of TControl and TWinControl.

Every control has an origin (Top, Left) and extent (Width, Height). The origin is relative to its Parent control (client coordinates) or, for floating controls (forms) with Parent=Nil, relative to the screen.

The BoundsRect describes the TopLeft and BottomRight coordinates of the control, relative to its Parent.

The BoundsRectForNewParent holds the new coordinates, to be used when the Parent of the control is changed later.

The ClientRect describes the internal (client) area of a container control (TWinControl), excluding borders. Its Top and Left are always zero. In a TScrollingWinControl...[?]

BaseBounds is [what?]

GetControlOrigin returns the screen coordinates of the control. These values are not always in sync with the true screen position, managed by the widgetset.

ScreenToClient returns the client coordinates of an given point on the screen coordinates, i.e. the coordinates relative to the control's client origin.

The latest version of this document can be found at lazarus-ccr.sourceforge.net .