Bagikan melalui


TextBoxBase.ExtentWidth Properti

Definisi

Mendapatkan ukuran horizontal area konten yang terlihat.

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

Nilai Properti

Nilai floating-point yang menentukan ukuran horizontal area konten yang terlihat, dalam unit independen perangkat (1/96 inci per unit).

Nilai properti ini adalah 0,0 jika kontrol pengeditan teks tidak dikonfigurasi untuk mendukung pengguliran.

Properti ini tidak memiliki nilai default.

Contoh

Contoh berikut menunjukkan cara membaca nilai ExtentWidth properti .

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

Berlaku untuk

Lihat juga