RadioButton コンストラクタ
アセンブリ: System.Web (system.web.dll 内)
構文
RadioButton コンストラクタを使用して、RadioButton クラスの新しいインスタンスを作成する方法を次のコード例に示します。
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 Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
RadioButton クラス
RadioButton メンバ
System.Web.UI.WebControls 名前空間
その他の技術情報
RadioButton Web サーバー コントロールおよび RadioButtonList Web サーバー コントロール
RadioButton コンストラクタ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文
使用例
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 コンストラクタのページへのリンク