×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    73

    How do I remove selected item from listbox?

    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
    Join Date
    Mar 2003
    Posts
    371

    RE: How do I remove selected item from listbox?

    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
  •  
×