Domanda

I'm trying to set the initial a combobox displays, it should be from code. The elements in my combobox are strings.

È stato utile?

Soluzione

The question is how did you fill the combo box to begin with?

I'm assuming the combo box isn't filled with integers. If you want to select by an offset you need to invoke setSelectedIndex not setSelectedItem.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top