TabAlignment 列挙型

定義

タブ コントロール内のタブの位置を指定します。

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

フィールド

名前 説明
Top 0

タブはコントロールの上部にあります。

Bottom 1

タブはコントロールの下部にあります。

Left 2

タブは、コントロールの左端に沿って配置されます。

Right 3

タブは、コントロールの右端に沿って配置されます。

次のコード例は、 TabControl.Alignment プロパティと TabControl.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などのメンバーによって使用されます。

適用対象

こちらもご覧ください