Combobox shows only distinct values?


i would like to insert into a combobox some repeating values. For example: 1, 1, 1,…

But as I can see, the combobox only shows distinct values?
Is it possible to turn this feature off?

Thank you for any help,

You need different item-ids. But you should be able to set the caption of the id to “1” on all of them. (Not tested but should work)

Thank you for the answer, but I’m not sure that I understand…

How can I set different item-ids to the values in a combobox?

ComboBox c = new ComboBox()
c.addItem(“Id 1”)
c.addItem(“Id 2”)
c.addItem(“Id 3”)
c.setItemCaption(“Id 1”,“1”)
c.setItemCaption(“Id 2”,“1”)
c.setItemCaption(“Id 3”,“2”)

This way they will show up as 1, 1 and 2 in your box, but the ids of them are Id 1, Id 2 and Id 3 respectively.

Thank you Jonas, this solved my problem :).