TabAlignment Enum

Definisi

Menentukan lokasi tab dalam kontrol tab.

public enum class TabAlignment
public enum TabAlignment
type TabAlignment = 
Public Enum TabAlignment
Warisan
TabAlignment

Bidang

Nama Nilai Deskripsi
Top 0

Tab terletak di bagian atas kontrol.

Bottom 1

Tab terletak di bagian bawah kontrol.

Left 2

Tab terletak di sepanjang tepi kiri kontrol.

Right 3

Tab terletak di sepanjang tepi kanan kontrol.

Contoh

Contoh kode berikut menunjukkan cara menggunakan TabControl.Alignment properti dan TabControl.Appearance serta TabAlignment enumerasi dan TabAppearance . Untuk menjalankan contoh, tempelkan kode berikut dalam formulir yang berisi yang TabControl disebut TabControl1. Panggil metode ChangeTheLookOfTheTabControl dalam konstruktor formulir atau metode Muat.

private:
   void ChangeTheLookOfTheTabControl()
   {
      // Set the size and location of the TabControl.
      this->TabControl1->Location = System::Drawing::Point( 20, 20 );
      TabControl1->Size = System::Drawing::Size( 250, 250 );
      
      // Align the tabs along the bottom of the control.
      TabControl1->Alignment = TabAlignment::Bottom;
      
      // Change the tabs to flat buttons.
      TabControl1->Appearance = TabAppearance::FlatButtons;
   }
private void ChangeTheLookOfTheTabControl()
{

    // Set the size and location of the TabControl.
    this.TabControl1.Location = new System.Drawing.Point(20, 20);
    TabControl1.Size = new System.Drawing.Size(250, 250);

    // Align the tabs along the bottom of the control.
    TabControl1.Alignment = TabAlignment.Bottom;

    // Change the tabs to flat buttons.
    TabControl1.Appearance = TabAppearance.FlatButtons;
}
Private Sub ChangeTheLookOfTheTabControl()

    ' Set the size and location of the TabControl.
    Me.TabControl1.Location = New System.Drawing.Point(20, 20)
    TabControl1.Size = New System.Drawing.Size(250, 250)

    ' Align the tabs along the bottom of the control.
    TabControl1.Alignment = TabAlignment.Bottom

    ' Change the tabs to flat buttons.
    TabControl1.Appearance = TabAppearance.FlatButtons
End Sub

Keterangan

Enumerasi ini digunakan oleh anggota seperti TabControl.Alignment.

Berlaku untuk

Lihat juga