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

# TControl.SetZOrder

Moves the control in front of or behind all sibling controls.

## Declaration

Source position: controls.pp line 1555

`protected procedure TControl.SetZOrder(`
`TopMost: Boolean`
`); virtual;`

## Arguments

`TopMost` |  | True to move the control in front of other sibling controls. False to move the control behind other siblings.

## Description

SetZOrder calls the SetChildZPosition method in the Parent control to change the Z-Order for the control instance. TopMost indicates whether the control is moved to the top or bottom of the Z-Order.

No actions are performed in the method when Parent has not been assigned.

SetZOrder is used to implement the BringToFront and SendToBack methods. It may be overridden is descendent classes to perform actions needed for the derived controls. See TCustomForm.SetZOrder.

## See also

TControl.Parent |  | The control within which the control is shown.
TWinControl.SetChildZPosition |  | Updates the position of the child control in the Z plane (i.e. front-to-back).
TCustomForm.SetZOrder |  | Moves a top-level form in front of or behind all other forms.