Control.ControlCollection.GetChildIndex 메서드

정의

컨트롤 컬렉션 내에서 컨트롤의 인덱스를 검색합니다.

오버로드

Name Description
GetChildIndex(Control)

컨트롤 컬렉션 내에서 지정된 자식 컨트롤의 인덱스를 검색합니다.

GetChildIndex(Control, Boolean)

컨트롤 컬렉션 내에서 지정된 자식 컨트롤의 인덱스를 검색하고 지정된 컨트롤이 컨트롤 컬렉션 내에 없는 경우 필요에 따라 예외를 발생합니다.

GetChildIndex(Control)

Source:
Control.ControlCollection.cs
Source:
Control.ControlCollection.cs
Source:
Control.ControlCollection.cs
Source:
Control.ControlCollection.cs
Source:
Control.ControlCollection.cs

컨트롤 컬렉션 내에서 지정된 자식 컨트롤의 인덱스를 검색합니다.

public:
 int GetChildIndex(System::Windows::Forms::Control ^ child);
public int GetChildIndex(System.Windows.Forms.Control child);
member this.GetChildIndex : System.Windows.Forms.Control -> int
Public Function GetChildIndex (child As Control) As Integer

매개 변수

child
Control

Control 컨트롤 컬렉션에서 검색할 대상입니다.

반품

컨트롤 컬렉션 내에서 지정된 자식 컨트롤의 위치를 나타내는 인덱스 값(0부터 시작)입니다.

예외

컨트롤이 child .에 Control.ControlCollection없습니다.

설명

인덱스 값이 0인 컨트롤은 z 순서의 맨 위에 있고 더 높은 숫자는 아래쪽에 가깝습니다.

추가 정보

적용 대상

GetChildIndex(Control, Boolean)

Source:
Control.ControlCollection.cs
Source:
Control.ControlCollection.cs
Source:
Control.ControlCollection.cs
Source:
Control.ControlCollection.cs
Source:
Control.ControlCollection.cs

컨트롤 컬렉션 내에서 지정된 자식 컨트롤의 인덱스를 검색하고 지정된 컨트롤이 컨트롤 컬렉션 내에 없는 경우 필요에 따라 예외를 발생합니다.

public:
 int GetChildIndex(System::Windows::Forms::Control ^ child, bool throwException);
public:
 virtual int GetChildIndex(System::Windows::Forms::Control ^ child, bool throwException);
public int GetChildIndex(System.Windows.Forms.Control child, bool throwException);
public virtual int GetChildIndex(System.Windows.Forms.Control child, bool throwException);
member this.GetChildIndex : System.Windows.Forms.Control * bool -> int
abstract member GetChildIndex : System.Windows.Forms.Control * bool -> int
override this.GetChildIndex : System.Windows.Forms.Control * bool -> int
Public Function GetChildIndex (child As Control, throwException As Boolean) As Integer
Public Overridable Function GetChildIndex (child As Control, throwException As Boolean) As Integer

매개 변수

child
Control

Control 컨트롤 컬렉션에서 검색할 대상입니다.

throwException
Boolean

매개 변수에 지정된 컨트롤이 아닌 경우 예외를 throw하려면 /&이고, 그렇지 않으면 .

반품

컨트롤 컬렉션 내에서 지정된 자식 컨트롤의 위치를 나타내는 인덱스 값(0부터 시작)입니다. 지정한 항목이 ControlControl.ControlCollection없으면 -1.

예외

childControl 아닌 경우 Control.ControlCollectionthrowException 매개 변수 값은 .입니다true.

설명

인덱스 값이 0인 컨트롤은 z 순서의 맨 위에 있고 더 높은 숫자는 아래쪽에 가깝습니다. -1 반환 값은 매개 변수가 있는 throwException 경우에만 반환됩니다 false.

추가 정보

적용 대상