Hi,
I try to change icon in listbox dynamically. Got no error during compilation but the icon in listbox is not change.
void CSMSExampleAddressContainer::ChangeIconsL()
{
if (iAddListBox)
{
// Not taking ownership
CTextListBoxModel* model = iAddListBox->Model();
model->SetOwnershipType (ELbmOwnsItemArray);
CDesCArray* NameArray = STATIC_CAST(CDesCArray*, model->ItemTextArray());
// Change all icon values.
for (TInt i = 0; i < NameArray->Count(); i=i+2)
{
TBuf <KAknExListAddItemBufLength> changeItem( (*NameArray)[i] );
// Change the icon to selected
changeItem.Replace(0, 2, _L("0\t"));
}
iAddListBox->HandleItemAdditionL();
}
}
Thanks...




