Reputation: 3258
In Delphi, how do you control a visual control's z-axis position at runtime? e.g. How, programmatically and at runtime, do you accomplish the equivalent of (from the IDE main menu) "Edit -> Bring to Front" at designtime?
Upvotes: 17
Views: 9468
Reputation: 53476
Just to add some information.
Controls are created in order (in the dfm file). The last control overlaps the first if they share part of the window. You can change the order by changing the order of the controls in the dfm file.
At runtime, you can change the order in the control list. But BringToFront will do this for you.
Upvotes: 11