RadioButton コンストラクター
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
RadioButton クラスの新しいインスタンスを初期化します。
public:
RadioButton();
public RadioButton();
Public Sub New ()
例
次のコード例では、 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
注釈
RadioButtonの既定のビューでは、テキストがボタンの右側に配置され、AutoCheck プロパティがtrueに設定されます。