110,571
社区成员
发帖
与我相关
我的任务
分享
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
this.comboBox1.Items.Add("A");
this.comboBox1.Items.Add("B");
this.comboBox1.Items.Add("C");
this.comboBox1.SelectedText = "C";
}
}
this.comboBox1.Items.Add("A");
this.comboBox1.Items.Add("B");
this.comboBox1.Items.Add("C");
this.comboBox1.SelectedIndex = 2;
comboBox4.SelectedIndex = 0;
或
comboBox4.SelectedIndex = comboBox4.Items.IndexOf("字符串");