In C # , the multi-box component is:checkbox. As with the radio box, it is also a relatively common component.
The main properties of the Multi box are:Name,Text,Checked.
The Name property represents the names of this component. the Text property represents the title of this component. Checked Indicates whether this component is already selected.
The main event is the checkedchanged event.
For example: Choose multiple choices of your personal interests and hobbies. The relevant effects and code are as follows:
void checkbox1checkedchanged(Objectsender,EventArgse)
{
if(CheckBox1. Checked)
{
TextBox1.AppendText(CheckBox1. text+"\ n");
}
}
void checkbox2checkedchanged(Objectsender,EventArgse)
{
if(CheckBox1. Checked)
{
TextBox1.AppendText(CheckBox2. text+"\ n");
}
}
void checkbox3checkedchanged(Objectsender,EventArgse)
{
if(CheckBox3. Checked)
{
TextBox1.AppendText(CheckBox3. text+"\ n");
}
}
void checkbox4checkedchanged(Objectsender,EventArgse)
{
if(checkBox4. Checked)
{
TextBox1.AppendText(checkBox4. text+"\ n");
}
}
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M00/08/AB/wKiom1nlo6LCquiyAAA3cO4Kosc379.png-wh_500x0-wm_ 3-wmp_4-s_3536624679.png "title=" 1.png "alt=" Wkiom1nlo6lcquiyaaa3co4kosc379.png-wh_50 "/>
29. C # The properties and events of the checkbox for multiple marquee checkboxes