Read-only archive of the All About Symbian forum (2001–2013) · About this archive

Problems with the listbox icons

2 replies · 3,933 views · Started 09 January 2003

Hi! I have tried to add different icons for every item in my listbox but I allways get the first icon infront of all the items. I have tried the following:
---8<---8<---8<---
CArrayPtr<CGulIcon>* icons = new( ELeave ) CAknIconArray(2);
CleanupStack::PushL(icons);
icons->AppendL(iEikonEnv->CreateIconL(_L("\\system\\apps\\MyProg\\Icons.mbm"😉, 0, 1));
icons->AppendL(iEikonEnv->CreateIconL(_L("\\system\\apps\\MyProg\\Icons.mbm"😉, 2, 3));
iListBox->ItemDrawer()->ColumnData()->SetIconArray(icons);
CleanupStack::Pop();
---8<---8<---8<---

Any help?

hi,
you need to set the icon numbers in your items text array. Like this :
"0\t....\t..."
"1\t....\t..."
"2\t....\t..."
etc.

dad wrote:hi,
you need to set the icon numbers in your items text array. Like this :
"0\t....\t..."
"1\t....\t..."
"2\t....\t..."
etc.

i had same problem with GRID which now is solved 😊