Combo Box Hidden Values

How to hide values in the combox box. Will anyone help me


Try adding a filter to the underlying container? See
for more info on containers and filters.

Hi I want to get as Key and value pair in the combo box and Values should be displayed. I am using ComboBox only.
Please provide any samples if you have… Thanks

Ah, in that case just combobox.setItemCaption(key, value) should do the trick.

Hi Anna Koskinen,
​ But I am getting empty values when i ran below code

           final ComboBox samplecombox  = new ComboBox("");
          samplecombox .setItemCaption(1,"India");
         samplecombox .setItemCaption(1,"USA");


You must first add the items before you can assign captions to them. So just add samplecombox.addItem(1) before the line where you try giving it a caption. You are also trying to set two captions to the same item there, but I guess that’s just a typo and the second one was supposed to have parameters (2,“USA”).

Will you five sample code if you have…please. I am not clear

Combobox cb = new Combobox("");
cb.setItemCaption(1, "India");//sets the displayed caption of the Item 1 to India
cb.setItemCaption(2, "USA");//sets the displayed caption of the Item 2 to USA

I made this code without an IDE so there might be syntax errors

Thanks Boss… It is working fine now…