NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

RadioButton Constructor

Initializes a new instance of the RadioButton class.

[Visual Basic]
Public Sub New()
[C#]
public RadioButton();
[C++]
public: RadioButton();
[JScript]
public function RadioButton();

Remarks

The default view of the RadioButton has its text aligned to the right of the button and the AutoCheck property is set to true.

Example

The following example instantiates a RadioButton, gives it the appearance of a toggle button, and sets its AutoCheck property to false.

Private Sub MySub()
   ' Initialize a new RadioButton. 
   Form1.RadioButton1 = New System.WinForms.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.
   Form1.Controls.Add(RadioButton1)
End Sub

See Also

RadioButton Class | RadioButton Members | System.WinForms Namespace