I have a string "test1" and my comboBox contains test1
, test2
, and test3
. How do I set the selected item to "test1"? That is, how do I match my string to one of the comboBox items?
I was thinking of the line below, but this doesn't work.
comboBox1.SelectedText = "test1";
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…