ScrollableControl 클래스

자동 스크롤 동작을 지원하는 컨트롤에 대한 기본 클래스를 정의합니다.

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

구문

‘선언
<ComVisibleAttribute(True)> _
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _
Public Class ScrollableControl
    Inherits Control
    Implements IComponent, IDisposable
‘사용 방법
Dim instance As ScrollableControl
[ComVisibleAttribute(true)] 
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)] 
public class ScrollableControl : Control, IComponent, IDisposable
[ComVisibleAttribute(true)] 
[ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)] 
public ref class ScrollableControl : public Control, IComponent, IDisposable
/** @attribute ComVisibleAttribute(true) */ 
/** @attribute ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) */ 
public class ScrollableControl extends Control implements IComponent, IDisposable
ComVisibleAttribute(true) 
ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) 
public class ScrollableControl extends Control implements IComponent, IDisposable

설명

일반적으로 ScrollableControl 클래스는 직접 사용하지 않습니다. ContainerControlPanel 클래스는 이 클래스에서 상속됩니다.

ScrollableControl 클래스는 스크롤 기능이 필요한 컨트롤에 대한 기본 클래스 역할을 수행합니다. 필요할 때 컨트롤에서 스크롤 막대를 표시하도록 하려면 AutoScroll 속성을 true로 설정하고 AutoScrollMinSize 속성을 원하는 크기로 설정합니다. 컨트롤이 지정한 최소 크기보다 작게 조정되거나 자식 컨트롤이 컨트롤의 범위 밖에 있으면 해당 스크롤 막대가 표시됩니다.

표시되는 스크롤 막대를 수동으로 재정의하려면 VScrollHScroll 속성을 설정합니다. 두 가지 속성 중 하나가 false로 설정되어 있으면 AutoScroll 속성이 true로 설정되어 있어도 해당 스크롤 막대가 표시되지 않습니다.

Scroll 이벤트를 처리하면 사용자 또는 코드에 의해 클라이언트 영역이 스크롤되는 때를 알 수 있습니다.

스크롤 가능 컨트롤에 컨트롤을 추가할 경우, 추가되는 컨트롤의 Location 속성이 나타내는 해당 좌표에서 오프셋만큼 AutoScrollPosition의 X 좌표 및 Y 좌표를 더하거나 빼야 합니다. 스크롤 위치의 위쪽 또는 왼쪽에 컨트롤을 추가할 경우 원하는 위치에 해당 오프셋을 더해야 합니다. 또한 스크롤 위치의 아래쪽 또는 오른쪽에 컨트롤을 추가할 경우에는 해당 오프셋을 빼야 합니다.

상속 계층 구조

System.Object
   System.MarshalByRefObject
     System.ComponentModel.Component
       System.Windows.Forms.Control
        System.Windows.Forms.ScrollableControl
           System.Windows.Forms.ContainerControl
           System.Windows.Forms.Design.ComponentTray
           System.Windows.Forms.Panel
           System.Windows.Forms.ToolStrip

스레드로부터의 안전성

이 형식의 모든 public static(Visual Basic의 경우 Shared) 멤버는 스레드로부터 안전합니다. 인터페이스 멤버는 스레드로부터 안전하지 않습니다.

플랫폼

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에서 지원

참고 항목

참조

ScrollableControl 멤버
System.Windows.Forms 네임스페이스
Panel 클래스
ContainerControl 클래스