# Combobox item

**URL:** <https://forum.kirupa.com/t/combobox-item/42449>\
**Category:** Uncategorized\
**Created:** [February 9, 2004, 1:21pm UTC](https://forum.kirupa.com/t/combobox-item/42449 "2004-02-09T13:21:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![franjime](https://avatars.discourse-cdn.com/v4/letter/f/e36b37/32.png) [@franjime](https://forum.kirupa.com/u/franjime)\
**Post date:** [February 9, 2004, 1:21pm UTC](https://forum.kirupa.com/t/combobox-item/42449/1 "2004-02-09T13:21:41Z")

</div>

please, is there any way to choose the item of a comobobox to be diplayed first?  
I have an array thet creates all the countries name to be listed in a comobox but now the client wants that “Spain” should be the default country to be shown in the list. I dont know how to. Right now I have the countries in alphabeticall order, so the first is Afghanistan, but I need Spain…  
GRACIAS, for your response.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 9, 2004, 4:36pm UTC](https://forum.kirupa.com/t/combobox-item/42449/2 "2004-02-09T16:36:59Z")

</div>

```auto
my_combobox.setSelectedIndex(index);

```

where _index_ is the index of the value you want to be displayed first

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 9, 2004, 6:25pm UTC](https://forum.kirupa.com/t/combobox-item/42449/3 "2004-02-09T18:25:54Z")

</div>

E viiiiiva España 🙂  
Todo bien ahorita?  
Te sale?
