Delete item and then insert item in Listbox.

Login to reply to this topic.
Thu, 2007-08-16 16:50
Joined: 2007-05-01
Forum posts: 40

Hi

I have a CAknColumnListBox listbox in Symbian C++ S60 3rd Edition FP1.

What my requirement is that during the runtime I want to delete all the items present in the listbox and then I want to insert the new set of items in the listbox.

How can it be done. Any ideas and or some sample code would be helpful to me.

Thanks in Advance.
Nand Kumar


Thu, 2007-08-16 21:06
Joined: 2007-06-20
Forum posts: 93
Re: Delete item and then insert item in Listbox.

hi,
As ur requirement

What my requirement is that during the runtime I want to delete all the items present in the listbox and then I want to insert the new set of items in the listbox.
Logically u do like this :---
a) when u need to Add new items just before count all items in Listbox and delete them, and after that
b) You Add new items in ur Listbox.
U take a look to this tutorial from NewLC for How to add an item and also How to remove an item:---
http://newlc.com/ListBox-Part-VI.html



Thanks & Regards,
C Singh

Wed, 2007-08-22 14:21
Joined: 2005-09-16
Forum posts: 141
Re: Delete item and then insert item in Listbox.

Hi,

Before inserting listbox,add this line to reset all items from listbox

ilistbox->Model()->ItemTextArray()->Reset();

regards,
eswar

  • Login to reply to this topic.