add/delete items combobox!

Hello !
I'm working with combobox.I add items in  to combobox :
Combobox.items.add(' teacher');
Combobox.items.add(' subject');
Combobox.items.add(' mark');
after that with  itemindex=0--->combobox.text='teacher'
i have question.How can i remove from combobox 'subject'?
Then if i wan't to add again item 'subject' in to combobox with can i do?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

       'Add items to combobox

        'Remove item "subject" from combobox
        For i As Integer = 0 To ComboBox1.Items.Count - 1
            If ComboBox1.Items(i).ToString = "subject" Then
                Exit For
            End If

        'Insert Item "subject" at desired index in a combo box
        Dim InsertItemAtIndex As Integer = 1
        ComboBox1.Items.Insert(InsertItemAtIndex, "subject")
Emmanuel PASQUIERFreelance Project ManagerCommented:
AmitGK, that is VB code.

Ok, it's almost the same in Delphi :

- Delete an item using position :

- Delete an item using text value :
which can also be written :
With Combo.Items do Delete(IndexOf('subject'));

- Insert item at a specific position :

- insert item only if not found :
With Combo.Items do if IndexOf('subject')<0 Then Insert(1,'Subject');

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.