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

<LocalizableAttribute(True)> _ Public Property Appearance As Appearance
Dim instance As RadioButton 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 に設定されている場合、RadioButton コントロールは、円形のチェック ボックス付きボタンとして描画されます。値が Button に設定されている場合、RadioButton は、選択解除されている状態と選択されている状態を示すコントロールとして描画されます。どちらの状態でも、テキスト、イメージ、またはその両方を表示できます。

RadioButton を作成および初期化し、トグル コントロールのような外観にするコード例を次に示します。AutoCheck プロパティを false に設定して、ボタンを Form に追加します。
Private Sub InitializeMyRadioButton() ' Create and initialize a new RadioButton. Dim radioButton1 As New RadioButton() ' Make the radio button control appear as a toggle button. radioButton1.Appearance = Appearance.Button ' Turn off the update of the display on the click of the control. radioButton1.AutoCheck = False ' Add the radio button to the form. Controls.Add(radioButton1) End Sub
private void InitializeMyRadioButton() { // Create and initialize a new RadioButton. RadioButton radioButton1 = new RadioButton(); // Make the radio button control appear as a toggle button. radioButton1.Appearance = Appearance.Button; // Turn off the update of the display on the click of the control. radioButton1.AutoCheck = false; // Add the radio button to the form. Controls.Add(radioButton1); }
private void InitializeMyRadioButton() { // Create and initialize a new RadioButton. RadioButton radioButton1 = new RadioButton(); // Make the radio button control appear as a toggle button. radioButton1.set_Appearance(Appearance.Button); // Turn off the update of the display on the click of the control. radioButton1.set_AutoCheck(false); // Add the radio button to the form. get_Controls().Add(radioButton1); } //InitializeMyRadioButton

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


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