The combo box is what we usually call a drop-down list box. Since it's a drop-down list box, you'll add data to the drop-down list box. Data additions are made through the properties:Items . When you click the property, a dialog box pops up and you can add content to it. The following effects are added:
such as adding: Spring, summer, autumn, winter
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M01/A7/31/wKioL1njFdizf7imAAA27zk4aMs021.png-wh_500x0-wm_ 3-wmp_4-s_1868706008.png "title=" 1.png "alt=" Wkiol1njfdizf7imaaa27zk4ams021.png-wh_50 "/>
To add content to a drop-down list box, add a selected event to the drop-down list box and display the contents of the selected item.
The code is as follows:
void combobox1selectedindexchanged(Objectsender,EventArgse)
{
MessageBox.Show(ComboBox1. Text);
}
Note: When we select an item in the drop-down list, to remove the selected content, you must use the The Text property, not selectedtext. Because, when clicked, the focus disappears immediately, and after it disappears, the content cannot be taken.
Well, the general content of the study is these, and tomorrow, to refuel.
This article is from the "Smile" blog, please be sure to keep this source http://yiyiweixiao.blog.51cto.com/2476874/1972494
27, C # inside combo box ComboBox properties and Events