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

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

설명

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

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

적용 대상

추가 정보