RadioButton.Appearance プロパティ

定義

RadioButton の外観を指定する値を取得または設定します。

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

プロパティ値

Appearance 値のいずれか 1 つ。 既定値は Normal です。

例外

代入された値が、Appearance 値ではありません。

次のコード例では、 を RadioButton作成して初期化し、トグル コントロールの外観を指定し、その AutoCheck プロパティを に false設定し、 に Form追加します。

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 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

注釈

値が AppearanceNormalRadioButton設定されている場合、コントロールは循環チェック ボックスで描画されます。 値が にButtonRadioButton設定されている場合、 は、上下の状態に切り替えることができるコントロールとして描画されます。 どちらの種類でも、テキスト、画像、またはその両方を表示できます。

適用対象

こちらもご覧ください