Setting ComboBox text

Hello all,

New to C++ and need some help with a little matter.

I have a combobox on my form that I fill from a CSV file. No problem there....

What I want to do, is when a user selects something from the combobox the same combobox changes it to the index of the selected item.

Example:

Combobox contains

Pear
Apple
Grape
Orange
Lemon

On selection of Grape from the dropdown, the field gets set with 2 (the index of the item)

any help wold be helpful.....

Thanks!

Topic archived. No new replies allowed.