Control.ControlCollection.SetChildIndex(Control, Int32) Méthode

Définition

Définit l’index du contrôle enfant spécifié dans la collection sur la valeur d’index spécifiée.

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)

Paramètres

child
Control

Contrôle child à rechercher.

newIndex
Int32

Nouvelle valeur d’index du contrôle.

Exceptions

Le child contrôle n’est pas dans le Control.ControlCollection.

Remarques

Lorsqu’il SetChildIndex est appelé, le Control référencé par le child paramètre est déplacé vers la position spécifiée par newIndex et les autres Control références du Control.ControlCollection paramètre sont réorganisées pour prendre en charge le déplacement. Le contrôle avec une valeur d’index de zéro se trouve en haut de l’ordre z, et les nombres supérieurs sont plus proches du bas.

S’applique à

Voir aussi