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?
TControl.BringToFront;
will usually do it.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With