RAD Studio VCL Reference
TControl.SetZOrder Method

Repositions the control in its parent's control list, thereby changing position onscreen.

procedure SetZOrder(TopMost: Boolean); dynamic;
__fastcall SetZOrder(Boolean TopMost);

Call SetZOrder to change the z-order of the control. To make the control the topmost control, specify the TopMost value as true. To make the control the bottommost, set TopMost to false. 

After changing the order, SetZOrder invalidates the control to ensure repainting to reflect the new order. 

The stacking order of windowed and non-windowed controls cannot be mingled. For example, if you put a memo, a windowed control, on a form, and then put a label, a non-windowed control, on top of it, the label disappears behind the memo. Windowed controls always stack on top of non-windowed controls. In this example, calling the SetZOrder method of the label or the memo has no effect, the label always remains behind the memo. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!