TabControl.Appearance プロパティ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

<LocalizableAttribute(True)> _ Public Property Appearance As TabAppearance
Dim instance As TabControl Dim value As TabAppearance value = instance.Appearance instance.Appearance = value
[LocalizableAttribute(true)] public: property TabAppearance Appearance { TabAppearance get (); void set (TabAppearance value); }
/** @property */ public TabAppearance get_Appearance () /** @property */ public void set_Appearance (TabAppearance value)
public function get Appearance () : TabAppearance public function set Appearance (value : TabAppearance)
TabAppearance 値の 1 つ。既定値は Normal です。


Appearance プロパティを FlatButtons に設定した場合、Alignment プロパティが Top に設定されている場合だけ、指定どおりの外観で表示されます。それ以外の場合は、Appearance プロパティに Buttons 値が設定されたものとして表示されます。
![]() |
---|
Appearance プロパティを Buttons に設定した場合は、ボタンが正しく表示されるように Alignment プロパティも Top に設定する必要があります。 |

2 つの TabPage オブジェクトのある TabControl を作成する例を次に示します。この例では、Appearance プロパティを Buttons に設定します。この場合、タブ ページのタブはボタンとして表示されます。
この例では、System.Windows.Forms 名前空間を使用します。
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
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()); } }
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 ); }
import System.Windows.Forms.*; public class Form1 extends 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.set_Appearance(TabAppearance.Buttons); tabControl1.get_Controls().AddRange(new TabPage[] {tabPage1, tabPage2}); get_Controls().Add(tabControl1); } //Form1 public static void main(String[] args) { Application.Run(new Form1()); } //main } //Form1

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- TabControl.Appearance プロパティのページへのリンク