Control.ControlCollection.SetChildIndex(Control, Int32) 메서드

정의

컬렉션에 있는 지정된 자식 컨트롤의 인덱스를 지정된 인덱스 값으로 설정합니다.

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)

매개 변수

child
Control

child 검색할 컨트롤입니다.

newIndex
Int32

컨트롤의 새 인덱스 값입니다.

예외

child 컨트롤이 Control.ControlCollection에 없는 경우

설명

SetChildIndex 호출되면 매개 변수에서 Control 참조 child 하는 위치가 지정된 newIndex 위치로 이동되고 이동에 맞게 다른 Control 참조 Control.ControlCollection 의 순서가 다시 지정됩니다. 인덱스 값이 0인 컨트롤은 z 순서의 맨 위에 있으며 더 높은 숫자는 아래쪽에 가깝습니다.

적용 대상

추가 정보