TWinControl.SetChildZPosition procedure
Updates the position of the child control in the Z plane (i.e. front-to-back).
Declaration
procedure SetChildZPosition(const AChild: TControl;
const APosition: Integer)Arguments
AChild | Control to locate and move in the method. |
APosition | New ordinal position for the control in the Controls property. |
Description
SetChildZPosition repositions the child control in
AChild
in the display order for the child Controls in the class instance. No actions
are performed in the method when:
- The Controls list has not been allocated.
- AChild has not been assigned (contains Nil).
- AChild is not stored in the child Controls for the class instance.
APosition contains the new relative display order on the Z-axis for
the specified child control. A value in APosition must be in the range allowed
in Controls (0..Controls.Count-1). Smaller values in APosition move the child
control towards the front or top of the display order. Larger values move the
child control towards the bottom or back of the display order.
SetChildZPosition calls the Move method in Controls to change the ordinal position for the specified control in the list.
If AChild is a TWinControl descendant, the SetChildZPosition method in the widgetset class is used to notify the child controls which have a valid handle. If AChild is a TControl instance, its InvalidateControl method is called to redraw the control using its visibility and opacity settings.
SetChildZPosition is used to implement the SetControlIndex method.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
