Control--combobox;radionbutton;timer;datagridview

Source: Internet
Author: User

ComboBox: Combo Box---Properties:

Text: The selected value

Items: item in a combo box

Add: Adding a single value

AddRange: Adding Multiple values

SelectedIndex: Index value

SelectedValue: Hidden values

DropDownStyle: drop-down box style

Remove: Delete

Clear: Clear

Cases:

Check the value of the text box

var Txt=this.combobox.text;

To add a single value

THIS.COMBOBOX.ADD ("small Black");

To add multiple values

string[]strs={"Small black", "Millet"};

This.ComboBox.AddRange ("small Black");

Select the first value

this.combobox.selectedindex=0;

Hidden values

this.combobox.selectedvalue=;

Drop-down box style is set to read-only

This.combobox.dropdownstyle=comboboxstyle.dropdownlist;

Delete the selected value

This.combobox = items.remove (TXT);

Clear the selected value

This.combobox = items.clear (TXT);

---event: selectedindexchanged: Event triggered when a drop-down box list is changed

Radionbutton: Radio Button---properties:

Checked: Whether to select

Cases:

if (this. radionbutton.checked) {

Messagerbox.show ("checked");

}else{

Messagerbox.show ("unchecked");

}

Timer: Clock Control---properties:

InterVal: time interval, Unit is milliseconds

Enavles: Turn on the clock

Cases:

Get current time

DateTime Dt=datetime.now;

Turn on the clock

This.timerl.Start ();

Set the time interval

this.timerl.interval=1000;

Stop clock

This.timerl.stop ();

DataGridView: The Underworld

Binding value: this. datagridview.datasource=table;

Checked value: this. Datagridview.selecteditems[0]. Cells[0]. Valus.tostring ();

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.