TextBoxBase.ExtentWidth 속성

정의

표시 되는 콘텐츠 영역의 가로 크기를 가져옵니다.Gets the horizontal size of the visible content area.

public:
 property double ExtentWidth { double get(); };
public double ExtentWidth { get; }
member this.ExtentWidth : double
Public ReadOnly Property ExtentWidth As Double

속성 값

표시되는 콘텐츠 영역의 가로 크기를 디바이스 독립적 단위(단위당 1/96인치)device-independent units (1/96th inch per unit) 단위로 지정하는 부동 소수점 값입니다.A floating-point value that specifies the horizontal size of the visible content area, in 디바이스 독립적 단위(단위당 1/96인치)device-independent units (1/96th inch per unit).

텍스트 편집 컨트롤이 스크롤을 지원 하도록 구성 되지 않은 경우이 속성의 값은 0.0입니다.The value of this property is 0.0 if the text editing control is not configured to support scrolling.

이 속성에는 기본값이 없습니다.This property has no default value.

예제

다음 예제에서는 ExtentWidth 속성의 값을 읽는 방법을 보여 줍니다.The following example demonstrates how to read the value of the ExtentWidth property.

private void initValues(object sender, EventArgs e)
{
    myTB1.Text= "ExtentHeight is currently " + myTextBox.ExtentHeight.ToString();
    myTB2.Text= "ExtentWidth is currently " + myTextBox.ExtentWidth.ToString();
    myTB3.Text= "HorizontalOffset is currently " + myTextBox.HorizontalOffset.ToString();
    myTB4.Text= "VerticalOffset is currently " + myTextBox.VerticalOffset.ToString();
    myTB5.Text = "ViewportHeight is currently " + myTextBox.ViewportHeight.ToString();
    myTB6.Text = "ViewportWidth is currently " + myTextBox.ViewportWidth.ToString();
    radiobtn1.IsChecked = true;
}
Private Sub initValues(ByVal sender As Object, ByVal e As EventArgs)
    myTB1.Text = "ExtentHeight is currently " + myTextBox.ExtentHeight.ToString()
    myTB2.Text = "ExtentWidth is currently " + myTextBox.ExtentWidth.ToString()
    myTB3.Text = "HorizontalOffset is currently " + myTextBox.HorizontalOffset.ToString()
    myTB4.Text = "VerticalOffset is currently " + myTextBox.VerticalOffset.ToString()
    myTB5.Text = "ViewportHeight is currently " + myTextBox.ViewportHeight.ToString()
    myTB6.Text = "ViewportWidth is currently " + myTextBox.ViewportWidth.ToString()
    radiobtn1.IsChecked = True

적용 대상

추가 정보