다음을 통해 공유


Control.ControlCollection.SetChildIndex 메서드

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

네임스페이스: System.Windows.Forms
어셈블리: System.Windows.Forms(system.windows.forms.dll)

구문

‘선언
Public Overridable Sub SetChildIndex ( _
    child As Control, _
    newIndex As Integer _
)
‘사용 방법
Dim instance As ControlCollection
Dim child As Control
Dim newIndex As Integer

instance.SetChildIndex(child, newIndex)
public virtual void SetChildIndex (
    Control child,
    int newIndex
)
public:
virtual void SetChildIndex (
    Control^ child, 
    int newIndex
)
public void SetChildIndex (
    Control child, 
    int newIndex
)
public function SetChildIndex (
    child : Control, 
    newIndex : int
)

매개 변수

  • child
    검색할 childControl입니다.
  • newIndex
    컨트롤의 새 인덱스 값입니다.

예외

예외 형식 조건

ArgumentException

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

설명

SetChildIndex가 호출되면 child 매개 변수에 의해 참조된 Control이 newIndex에 의해 지정된 위치로 이동되고 Control.ControlCollection의 다른 Control 참조는 이러한 위치 이동을 반영하도록 다시 배치됩니다. 인덱스 값이 0인 컨트롤이 Z 순서에서 맨 앞에 있고, 값이 클수록 아래쪽에 있습니다.

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

.NET Compact Framework

2.0, 1.0에서 지원

참고 항목

참조

Control.ControlCollection 클래스
Control.ControlCollection 멤버
System.Windows.Forms 네임스페이스
GetChildIndex