You can set the list item that is initially selected when the choice list is shown to the user. This feature can be used with a choice list of the type EAknChoiceListWithCurrentSelection.
If you do not set the selected item, the first item in the list is initially selected by default.
For details on how the choice list items are indexed, see Using the Choice list API.
void CMyAppContainer::CreateChoiceListL() { // Create empty Choice list iChoiceList = CAknChoiceList::NewL( this, NULL ); // Add items from resource iChoiceList->SetItemsL( R_CHOICELISTEX_ITEM_ARRAY ); // Set the default selected item iChoiceList->SetSelectedIndex( KDefaultIndex ); iChoiceList->SetObserver( this ); iChoiceList->SetRect( ChoiceListRect() ); }
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.