다음을 통해 공유


ScrollableControl.ScrollToControl(Control) 메서드

정의

지정된 자식 컨트롤에 대한 스크롤 오프셋을 계산합니다.

protected:
 virtual System::Drawing::Point ScrollToControl(System::Windows::Forms::Control ^ activeControl);
protected virtual System.Drawing.Point ScrollToControl(System.Windows.Forms.Control activeControl);
abstract member ScrollToControl : System.Windows.Forms.Control -> System.Drawing.Point
override this.ScrollToControl : System.Windows.Forms.Control -> System.Drawing.Point
Protected Overridable Function ScrollToControl (activeControl As Control) As Point

매개 변수

activeControl
Control

보기로 스크롤할 자식 컨트롤입니다.

반환

컨트롤을 보기로 스크롤하는 데 필요한 클라이언트 영역을 기준으로 표시 영역의 왼쪽 위입니다 Point .

설명

이 메서드는 ScrollControlIntoView 메서드를 ScrollToControl 사용하여 지정된 컨트롤을 표시하기 위해 스크롤해야 하는 간격을 계산합니다. AutoScrollOffset 자식 컨트롤의 속성은 스크롤된 위치를 조정하는 데 사용됩니다.

ScrollToControl 에서는 스크롤을 발생시키지 않습니다. SetDisplayRectLocation 이 메서드는 일반적으로 계산된 위치로 스크롤하는 데 사용됩니다.

적용 대상

추가 정보