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

Définition

Attribue la valeur d'index spécifiée à l'index du contrôle enfant spécifié dans la collection.

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 du contrôle.

Exceptions

Le contrôle child n'est pas dans 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 paramètre Control.ControlCollection sont réorganisées pour prendre en charge le déplacement. Le contrôle avec une valeur d’index égale à zéro se trouve en haut de l’ordre de plan, et les nombres supérieurs sont plus proches du bas.

S’applique à

Voir aussi