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.
Printable View
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.
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