Hi,

I need to show icons in the DoubleLargeStyleListBox. I am able to show the icons in the listbox, hwoever, there will be an error message when I scroll to the forth image and it will only show when there are only four images in the folder. One, two or three images cannot show. Below, is the code to create the icon and show in the listbox.

Can anyone help me out on this matter? I do not know where I have gone wrong. Would really appreciate your help.

Code:
void CTouristImageListContainer::CreateIconL()
{


iIconList = new(ELeave) CAknIconArray(iDirList->Count());

CPAlbImageUtil* imageAlbum = CPAlbImageUtil::NewL();
CPAlbImageData* imageData = CPAlbImageData::NewL();

CFbsBitmap* iBitmap;
CGulIcon* icon;
for (TInt i=0;i<iDirList->Count();i++)
{
imageData->SetImageNameL((*iDirList)[i].iName);
imageData->SetSubFolderL(*iItem->Photo());
iBitmap = imageAlbum->GetThumbnailL(*imageData);
icon = CGulIcon::NewL(iBitmap, NULL);
iIconList->AppendL(icon);
}

iListBox->ItemDrawer()->ColumnData()->SetIconArray(iIconList);


}


Thanks.

Juwita