TabAlignment 列舉

定義

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

C#
public enum TabAlignment
繼承
TabAlignment

欄位

Bottom 1

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

Left 2

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

Right 3

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

Top 0

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

範例

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

C#
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;
}

備註

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

適用於

產品 版本
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8
Windows Desktop 3.0, 3.1, 5, 6, 7

另請參閱