Discussion Board

Results 1 to 2 of 2

Hybrid View

  1. #1
    Regular Contributor mmalo's Avatar
    Join Date
    Mar 2003
    Posts
    73
    How do I remove currently selected item from listbox?


    CDesCArray* listboxArray = STATIC_CAST( CDesCArray*, iList->Model()->ItemTextArray() );
    listboxArray.Delete(TInt aPos);

    How do I get the aPos from iList?

    Thanks.

  2. #2
    Regular Contributor maokkone's Avatar
    Join Date
    Mar 2003
    Posts
    371
    Hi,

    There is quite good example about handling a list box in SDK Help page "Vertical text and icon listbox". The example is for CCknVerticalTextAndIconListBox, but it is similar for other list boxes as well.

    Removing the selected item from a list box can be handled like below.

    listBoxArray->Delete(listBox->CurrentItemIndex());
    listBox->HandleItemRemovalL(); //Does view setup but doesn't redraw
    listBox->DrawNow(); //Redraw item.

    Best Regards,
    Marko / Forum Nokia

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved