John
John

Reputation: 386

Combobox Add item problem

I want to add new item in combobox. But this item should be top in combobox.

For Example;

In my combobox items like; a,b,c,d I want to add e but e is the top.

After adding new item shoukld be -> e,a,b,c,d

How can I do this?

Thanks John

Upvotes: 0

Views: 307

Answers (1)

MatthiasG
MatthiasG

Reputation: 4532

Have you tried the Insert method of the Items collection of the ComboBox? You should be able to choose the position of the inserted item that way.

myComboBox.Items.Insert(0, myItem)

Upvotes: 2

Related Questions