Adding items to the choice list

Use the method CAknChoiceList::AddItemL() to add items to the choice list one by one. You can also add items in an array, or from resources. With this method, the items are added to the end of the list.

_LIT( KListItemNew, "New Item" );
TInt index = iChoiceList->AddItemL( &KListItemNew );

To add items to a specified location in the list, use the method CAknChoiceList::InsertItemL(). Note that in order to do this, you need to know the index of the location you want to add the item to. For details on how the list items are indexed, see Using the Choice list API.