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

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

例外の種類 | 条件 |
---|---|
InvalidEnumArgumentException | 代入された値が、Appearance 値ではありません。 |

Appearance 値を Normal に設定すると、CheckBox は通常の外観となります。値を Button に設定すると、CheckBox の外観はトグル ボタンのようになります。この場合、状態に合わせてオンとオフを切り替えることができます。

CheckBox を作成および初期化し、その外観をトグル ボタンにするコード例を次に示します。さらに、AutoCheck を false に設定し、トグル ボタンを Form に追加します。
Public Sub InstantiateMyCheckBox() ' Create and initialize a CheckBox. Dim checkBox1 As New CheckBox() ' Make the check box control appear as a toggle button. checkBox1.Appearance = Appearance.Button ' Turn off the update of the display on the click of the control. checkBox1.AutoCheck = False ' Add the check box control to the form. Controls.Add(checkBox1) End Sub 'InstantiateMyCheckBox
public void InstantiateMyCheckBox() { // Create and initialize a CheckBox. CheckBox checkBox1 = new CheckBox(); // Make the check box control appear as a toggle button. checkBox1.Appearance = Appearance.Button; // Turn off the update of the display on the click of the control. checkBox1.AutoCheck = false; // Add the check box control to the form. Controls.Add(checkBox1); }
public: void InstantiateMyCheckBox() { // Create and initialize a CheckBox. CheckBox^ checkBox1 = gcnew CheckBox; // Make the check box control appear as a toggle button. checkBox1->Appearance = Appearance::Button; // Turn off the update of the display on the click of the control. checkBox1->AutoCheck = false; // Add the check box control to the form. this->Controls->Add( checkBox1 ); }
public void InstantiateMyCheckBox() { // Create and initialize a CheckBox. CheckBox checkBox1 = new CheckBox(); // Make the check box control appear as a toggle button. checkBox1.set_Appearance(Appearance.Button); // Turn off the update of the display on the click of the control. checkBox1.set_AutoCheck(false); // Add the check box control to the form. get_Controls().Add(checkBox1); } //InstantiateMyCheckBox
public function InstantiateMyCheckBox() { // Create and initialize a CheckBox. var checkBox1 : CheckBox = new CheckBox(); // Make the check box control appear as a toggle button. checkBox1.Appearance = Appearance.Button; // Turn off the update of the display on the click of the control. checkBox1.AutoCheck = false; // Add the check box control to the form. Controls.Add(checkBox1); }

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


Weblioに収録されているすべての辞書からCheckBox.Appearance プロパティを検索する場合は、下記のリンクをクリックしてください。

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