다음을 통해 공유


ListBox.GetItemRectangle 메서드

ListBox의 항목에 대한 경계 사각형을 반환합니다.

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

구문

‘선언
Public Function GetItemRectangle ( _
    index As Integer _
) As Rectangle
‘사용 방법
Dim instance As ListBox
Dim index As Integer
Dim returnValue As Rectangle

returnValue = instance.GetItemRectangle(index)
public Rectangle GetItemRectangle (
    int index
)
public:
Rectangle GetItemRectangle (
    int index
)
public Rectangle GetItemRectangle (
    int index
)
public function GetItemRectangle (
    index : int
) : Rectangle

매개 변수

  • index
    해당 경계 사각형을 반환하려는 항목의 인덱스(0부터 시작)입니다.

반환 값

지정된 항목의 경계 사각형을 나타내는 Rectangle입니다.

예외

예외 형식 조건

ArgumentOutOfRangeException

index 매개 변수가 0보다 작거나 ListBox.ObjectCollection 클래스의 Count 속성 값보다 크거나 같은 경우

설명

index 매개 변수에 지정된 항목을 볼 수 없는 경우 이 메서드에 의해 반환된 사각형은 컨트롤의 가시 영역을 벗어납니다. 이 메서드를 사용하여 목록에 있는 항목의 크기 및 위치를 확인할 수 있습니다. 항목, 특히 소유자가 그린 가변 높이의 목록 항목 높이를 가져오려는 경우 GetItemHeight 메서드를 사용할 수 있습니다.

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, 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에서 지원

참고 항목

참조

ListBox 클래스
ListBox 멤버
System.Windows.Forms 네임스페이스