hi,
i am trying to disign CAknSingleGraphicStyleListBox example. Here i im reding list from array. i want output as icon and content of listbox. The code i written is
void CMyAppContainer::InitListBoxL()
{
// construct listbox item array
CDesCArray *itemList = new (ELeave) CDesCArrayFlat(5);
itemList->AppendL(_L("0\tFirst item\t"));
itemList->AppendL(_L("1\tSecond item\t"));
itemList->AppendL(_L("2\tThird item\t"));
itemList->AppendL(_L("3\tFourth item\t"));
// set items and ownership
iListBox->Model()->SetItemTextArray(itemList);
iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray);
iListBox->SetCurrentItemIndex(0);
//iListBox->SetFocus(ETrue);
iListBox->HandleItemAdditionL();
here its not giving icon. But if i give formate like
itemList->AppendL(_L("\tFirst item\t1"));
Then its giving icon at right side.
Please do you have solution for this problem???

Reply With Quote

