×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Apr 2006
    Location
    Malaysia
    Posts
    246

    Change icon in listbox

    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...
    Regards,
    Nini

  2. #2
    Regular Contributor
    Join Date
    Apr 2006
    Location
    India
    Posts
    383

    Re: Change icon in listbox

    R u setting a new text item array to the model after that??
    Regards,
    Shilpa Kulkarni

  3. #3
    Regular Contributor
    Join Date
    Apr 2006
    Location
    Malaysia
    Posts
    246

    Re: Change icon in listbox

    Hi,

    Sorry but how to do that?
    Regards,
    Nini

Similar Threads

  1. How Can I Change Icon of an Application
    By salopge in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2006-07-13, 15:43
  2. ListBox and icon problem....
    By basharbd in forum Symbian
    Replies: 1
    Last Post: 2005-08-12, 11:08
  3. Replies: 2
    Last Post: 2005-07-25, 06:07
  4. Replies: 0
    Last Post: 2005-04-19, 09:03
  5. Icon in column listbox does not appear
    By khanming in forum Symbian User Interface
    Replies: 1
    Last Post: 2002-06-26, 12:46

Posting Permissions

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