TabAlignment 列舉

定義

指定索引標籤控制項 (Tab Control) 中索引標籤的位置。

public enum class TabAlignment
public enum TabAlignment
type TabAlignment = 
Public Enum TabAlignment
繼承
TabAlignment

欄位

Bottom 1

索引標籤位於控制項底部。

Left 2

索引標籤位於控制項左邊緣。

Right 3

索引標籤位於控制項右邊緣。

Top 0

索引標籤位於控制項上方。

範例

下列程式碼範例示範如何使用 TabControl.AlignmentTabControl.Appearance 屬性和 和 TabAlignment TabAppearance 列舉。 若要執行此範例,請將下列程式碼貼到包含名為 TabControl1 的 TabControl 表單中。 在表單的建構函式或 Load 方法中呼叫 ChangeTheLookOfTheTabControl 方法。

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

備註

這類成員 TabControl.Alignment 會使用此列舉。

適用於

另請參閱