×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    41

    Icon in column listbox does not appear

    Hello.

    I have no problem to display plain text in CEikColumnListBox.
    But when I try to display icon on first column, it does not appear.

    CArrayPtrFlat<CGulIcon>* iconArray=new(ELeave) CArrayPtrFlat<CGulIcon>(256);
    CGulIcon* icon=NULL;
    icon=iEikonEnv->CreateIconL(KIconAppt,0,0);
    iconArray->AppendL(icon);
    colData->SetGraphicsColumnL(0,ETrue);
    colData->SetIconArray(iconArray);
    iListBox->DrawNow();

    Am I missing something?

    Also, how do I able to show text and icon at the same time?
    If I set listbox item array as follow while the first column already been set to graphics column, it will ended with EIKCTL 42 panic.

    itemArray->AppendL(_L("\t 2nd col \t 3rd col"));

    In summary:
    1. How to show icon in column listbox (after accumulating it)?
    2. How to show text in conjunction with icon? (Just plain text worked, but not text with icon)

    Thank you very much!


    Question edited for latest discovery:

    Now I think I know how to display the icon.
    If, for example, the first column is set as graphical column, then when passing text to listbox array, the first column should be integer represented in text (pointing to which icon in IconArray).
    Like this:

    itemArray->AppendL(_L("0\t 2nd col \t 3rd col")); // notice the "0"

    But I have new problem, after appending text to listbox array, I receive KERN-EXEC 3 when I invoke:

    iListBox->DrawNow();

    Can someone pointing me out? I think I am almost there...


    Question edited again for latest status:

    This problem is very urgent and no matter how I have to find out the solution today, and finally, after some troubleshooting (cut here and paste there), the KERN-EXEC 3 panic solved! It is caused by deleting an object which should not be deleted.

    The icons now show nicely! :-)
    Sorry for multiple self replies.

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    6

    RE: Icon in column listbox does not appear

    I think I'm having a similar problem... What did you mean with the last comment, "deleting an object which should not be deleted"?

    Thanks,

    Anu

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •