×

Discussion Board

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

    How to get two icons on the same list box item?

    hi,

    I want to display two icons [left and right handside]

    on a list item, could any one please tell me howto go abt it....


    am not able to get icon on the right hand side of the list item




    Please Reply ASAP


    varsha.

  2. #2
    Registered User
    Join Date
    Apr 2003
    Location
    Portugal
    Posts
    23
    You can do it using a CAknSingleGraphicStyleListBox.

    When you specify the text array, you use a format like the following:

    CDesCArray* cArray = new (ELeave) CDesCArrayFlat(15);
    CleanupStack::PushL(cArray);

    cArray->AppendL(_L("0\tLabel 1\t1"));
    cArray->AppendL(_L("0\tLabel 2\t1"));
    cArray->AppendL(_L("0\tLabel 3\t1"));

    CleanupStack::Pop(); // cArray
    iList->Model()->SetItemTextArray(cArray);
    iList->HandleItemAdditionL();

    The text for each item has 3 parts separated by a \t. The first is the index in the icon array of the icon you want to use, the second is the label and the third is once again an index for the icon you want to use.

    If you don't have the series 60 book by digia, i recommend it, if nothing else, for its chapter on lists.

    Regards,
    Vitor Fernandes

Posting Permissions

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