Change the current selected item in a ComboBox by code

Hi

Given a ComboBox initialized like below :

cboDevice.addItem(“First”, 1);
cboDevice.addItem(“Second”, 2);
cboDevice.addItem(“Third”, 3);

I’m unable to have it showing the expected item :

cboDevice.setSelectedId(2);
cboDevice.setSelectedItemIndex(2);
cboDevice.setText(“Second”);

None of those calls work, any clue ? Thanks

Regards

How about changeItemText( 1, “First” ); ?

Thanks but maybe because it is not what I want ?
==> I wish to change visually the selected item (here to be the 2th one) !
I don’t want to change its text value…

Regards

I think we need to see more code, because your approach looks correct, and I do similar things without issue.