Control.ControlCollection.SetChildIndex(Control, Int32) Metod

Definition

Anger indexet för den angivna underordnade kontrollen i samlingen till det angivna indexvärdet.

public:
 void SetChildIndex(System::Windows::Forms::Control ^ child, int newIndex);
public:
 virtual void SetChildIndex(System::Windows::Forms::Control ^ child, int newIndex);
public void SetChildIndex(System.Windows.Forms.Control child, int newIndex);
public virtual void SetChildIndex(System.Windows.Forms.Control child, int newIndex);
member this.SetChildIndex : System.Windows.Forms.Control * int -> unit
abstract member SetChildIndex : System.Windows.Forms.Control * int -> unit
override this.SetChildIndex : System.Windows.Forms.Control * int -> unit
Public Sub SetChildIndex (child As Control, newIndex As Integer)
Public Overridable Sub SetChildIndex (child As Control, newIndex As Integer)

Parametrar

child
Control

Kontrollen child att söka efter.

newIndex
Int32

Kontrollens nya indexvärde.

Undantag

Kontrollen child finns inte i Control.ControlCollection.

Kommentarer

När SetChildIndex anropas flyttas den Control som anges av parametern child till den position som anges av newIndex och de andra Control referenserna i Control.ControlCollection ordnas om för att passa flytten. Kontrollen med indexvärdet noll är överst i z-ordningen och högre tal ligger närmare botten.

Gäller för

Se även