Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>When you place more than one control in the same place,one will end up on top,and the other will end up underneath.Usually this is the result of a minor mistake,such as incorrectly using the anchoring and docking features to creare resizable form.In some cases,however,you might want to overlap control for a specific effect.</p> <p>When control overlap,it's the z-index that determines which control ends up on top.Essentially,every control existy in its own distinct numbered layer.A control that has the z-index layer 1 will appear above a control in z-index layer 2 if they overlap.Usually,the z-index of a group of controls is determined by the order in which you add the controls,so that the last control you add is always in the topmost layer (with a z-index of 0).</p> <p>However, you can change these options.</p> <p>To determine or set the z-index of a control , you can use the <code>GetChildIndex()</code> and <code>SetChildIndex()</code> methods of the Controls Collection.Here's an example that moves a control to the third layer in the z-index.</p> <pre><code>Controls.SetChildIndex(ctrl, 2); </code></pre> <p>Usually, you won't need this kind of find-grained control.Instead,you'll just want to drop a control to the back of the z-index (the bottom-most layer) or bring it to the top.You can accomplish this feature at design time by right clicking on a control and choosing Bring to Fron or Send to Back.You can also perform the same task programmatically using the <code>Control.BringToFront()</code> or <code>Control.SendToBack()</code> methods.</p> <pre><code>ctrl.BringToFront(); // This is equivalent to Controls.SetChildIndex(ctrl,0); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload