RadioButton.PerformClick Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Generates a Click event for the control, simulating a click by a user.
public:
void PerformClick();
public void PerformClick ();
member this.PerformClick : unit -> unit
Public Sub PerformClick ()
Examples
The following code example evaluates a ListBox selection and the Checked property of a RadioButton. When a specified item is selected from the list box, the PerformClick method of another RadioButton is called. This example requires that two RadioButton controls and a ListBox have been instantiated on a form.
private:
void ClickMyRadioButton()
{
// If Item1 is selected and radioButton2
// is checked, click radioButton1.
if ( listBox1->Text == "Item1" && radioButton2->Checked )
{
radioButton1->PerformClick();
}
}
private void ClickMyRadioButton()
{
// If Item1 is selected and radioButton2
// is checked, click radioButton1.
if (listBox1.Text == "Item1" && radioButton2.Checked)
{
radioButton1.PerformClick();
}
}
Private Sub ClickMyRadioButton()
' If Item1 is selected and radioButton2
' is checked, click radioButton1.
If (listBox1.Text = "Item1") And radioButton2.Checked Then
radioButton1.PerformClick()
End If
End Sub
Applies to
See also
שתף איתנו פעולה ב- GitHub
ניתן למצוא את המקור לתוכן זה ב- GitHub, שם ניתן גם ליצור ולסקור בעיות ולמשוך בקשות. לקבלת מידע נוסף, עיין במדריך התורמים שלנו.