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

Raises the System.WinForms.CheckBox.CheckedChanged event.

[Visual Basic]
Overridable Protected Sub OnCheckedChanged( _
   ByVal e As EventArgs _
)
[C#]
protected virtual void OnCheckedChanged(
   EventArgs e
);
[C++]
protected: virtual void OnCheckedChanged(
   EventArgs* e
);
[JScript]
protected function OnCheckedChanged(
   e : EventArgs
);

Parameters

e
An EventArgs that contains the event data.

Example [Visual Basic]

The following example demonstrates how the CheckAlign property may be changed at run time. The check box portion of a radio button control is moved to the right or left of the text when the Checked value changes. This code assumes that two RadioButton controls have been instantiated on a form.

[Visual Basic]

Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, _
    ByVal e As System.EventArgs)
   ' Change the check box position opposite its current position.
   If RadioButton1.CheckAlign = System.Drawing.ContentAlignment.MiddleLeft Then
      RadioButton1.CheckAlign = System.Drawing.ContentAlignment.MiddleRight
   Else
       RadioButton1.CheckAlign = System.Drawing.ContentAlignment.MiddleLeft
   End If
End Sub

See Also

RadioButton Class | RadioButton Members | System.WinForms Namespace | AddOnCheckedChanged | RemoveOnCheckedChanged