Skip to content

Latest commit

 

History

History
80 lines (61 loc) · 2.83 KB

File metadata and controls

80 lines (61 loc) · 2.83 KB
layout post
title CheckBoxAdv Events in Windows Forms CheckBox control | Syncfusion®
description Learn about CheckBoxAdv Events support in Syncfusion® Windows Forms CheckBox (CheckBoxAdv) control and more details.
platform windowsforms
control EditorsPackage
documentation ug

CheckBoxAdv Events in Windows Forms CheckBox (CheckBoxAdv)

This section gives detailed explanation about the CheckStateChanged and CheckedChanged events in CheckBoxAdv control.

CheckBoxAdv Events Description
CheckStateChanged This event occurs when the CheckState property is changed.
CheckedChanged This event is raised when the Checked property is changed.

CheckStateChanged Event

This event is raised when the CheckState property of CheckBoxAdv is changed and the event handler receives an argument of type EventArgs containing data related to this event.

{% tabs %} {% highlight c# %}

private void checkBoxAdv1_CheckStateChanged(object sender, EventArgs e) { Console.WriteLine(" CheckStateChanged event is raised"); }

{% endhighlight %}

{% highlight vb %}

Private Sub checkBoxAdv1_CheckStateChanged(ByVal sender As Object, ByVal e As EventArgs) Console.WriteLine(" CheckStateChanged event is raised") End Sub

{% endhighlight %} {% endtabs %}

CheckedChanged Event

This event is raised when the Checked property is changed and this property changes automatically when the CheckState property is changed.

{% tabs %} {% highlight c# %}

private void checkBoxAdv1_CheckedChanged(object sender, EventArgs e) { if (!checkBoxAdv1.Checked) MessageBox.Show("Checkbox Unchecked"); else MessageBox.Show("Checkbox checked"); }

{% endhighlight %}

{% highlight vb %}

Private Sub checkBoxAdv1_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) If Not checkBoxAdv1.Checked Then MessageBox.Show("Checkbox checked”) Else MessageBox.Show("Checkbox checked”) End If End Sub

{% endhighlight %} {% endtabs %}