TabControl.Appearance TabControl.Appearance TabControl.Appearance TabControl.Appearance Property

정의

컨트롤 탭의 시각적 모양을 가져오거나 설정합니다.Gets or sets the visual appearance of the control's tabs.

public:
 property System::Windows::Forms::TabAppearance Appearance { System::Windows::Forms::TabAppearance get(); void set(System::Windows::Forms::TabAppearance value); };
public System.Windows.Forms.TabAppearance Appearance { get; set; }
member this.Appearance : System.Windows.Forms.TabAppearance with get, set
Public Property Appearance As TabAppearance

속성 값

TabAppearance 값 중 하나입니다.One of the TabAppearance values. 기본값은 Normal입니다.The default is Normal.

예외

속성 값이 올바른 TabAppearance 값이 아닌 경우The property value is not a valid TabAppearance value.

예제

다음 코드 예제는 TabControl 두 개의 TabPage 개체입니다.The following code example creates a TabControl with two TabPage objects. 설정 하는이 예제는 Appearance 속성을 Buttons, 탭 페이지의 탭 단추를 표시 합니다.This example sets the Appearance property to Buttons, which displays the tabs of the tab pages as buttons.

using namespace System;
using namespace System::Windows::Forms;
public ref class Form1: public Form
{
public:
   Form1()
   {
      array<String^>^tabText = {"tabPage1","tabPage2"};
      TabControl^ tabControl1 = gcnew TabControl;
      TabPage^ tabPage1 = gcnew TabPage( tabText[ 0 ] );
      TabPage^ tabPage2 = gcnew TabPage( tabText[ 1 ] );
      
      // Sets the tabs to appear as buttons.
      tabControl1->Appearance = TabAppearance::Buttons;
      array<TabPage^>^tabPageArray = {tabPage1,tabPage2};
      tabControl1->Controls->AddRange( tabPageArray );
      Controls->Add( tabControl1 );
   }

};

int main()
{
   Application::Run( gcnew Form1 );
}

using System.Windows.Forms;

public class Form1 : Form
{
    public Form1()
    {
        string[] tabText = {"tabPage1", "tabPage2"};
        TabControl tabControl1 = new TabControl();
        TabPage tabPage1 = new TabPage(tabText[0]);
        TabPage tabPage2 = new TabPage(tabText[1]);

        // Sets the tabs to appear as buttons.
        tabControl1.Appearance = TabAppearance.Buttons;

        tabControl1.Controls.AddRange(new TabPage[] {tabPage1, tabPage2});
        Controls.Add(tabControl1);
    }

    static void Main() 
    {
        Application.Run(new Form1());
    }
}
Imports System.Windows.Forms

Public Class Form1
    Inherits Form

    Public Sub New()
        Dim tabText As String() = {"tabPage1", "tabPage2"}
        Dim tabControl1 As New TabControl()
        Dim tabPage1 As New TabPage(tabText(0))
        Dim tabPage2 As New TabPage(tabText(1))

        ' Sets the tabs to appear as buttons.
        tabControl1.Appearance = TabAppearance.Buttons

        tabControl1.Controls.AddRange(New TabPage() {tabPage1, tabPage2})
        Controls.Add(tabControl1)
    End Sub

    Shared Sub Main()
        Application.Run(New Form1())
    End Sub
End Class

설명

설정한 경우는 Appearance 속성을 FlatButtons,으로 이러한 경우에만 표시 합니다 Alignment 속성 Top.When you set the Appearance property to FlatButtons, it only appears as such when the Alignment property is set to Top. 이 고, 그렇지 합니다 Appearance 속성이 표시 처럼로 Buttons 값입니다.Otherwise, the Appearance property appears as if set to the Buttons value.

참고

설정한 경우는 Appearance 속성을 Buttons를 설정 해야 합니다 Alignment 속성을 Top 탭 페이지 내용을 제대로 표시 되도록 합니다.When you set the Appearance property to Buttons, you must also set the Alignment property to Top so that the tab page contents display correctly.

적용 대상

추가 정보