How to Delete selected Item from Markable ListBox?
| Tue, 2006-05-30 14:27 | |
|
I list out some message in a Markable Listbox
And I tried to delete those message I have selected The message was dissappeared but The data on the Listbox items were still there How can I delete the releate item with the message? Could somebody show me a code to do that? |
|






Forum posts: 81
After deleting, you have to refresh the list :
 iListBox->HandleItemAdditionL();
 iListBox->DrawNow();
Hope it will help you.
Bernie
Forum posts: 16
This is the code that i have used to delete a selected item oto delete ,hope it will work for u
void CView8Container::DeleteSelectedL()
{
if (iBrookerListBox)
{
CTextListBoxModel* model = iBrookerListBox->Model();
if (model->NumberOfItems() > 0)
{
CDesCArray* itemArray = STATIC_CAST(CDesCArray*, model->ItemTextArray());
TInt currentItem = iBrookerListBox->CurrentItemIndex();
itemArray->Delete(currentItem);
AknListBoxUtils::HandleItemRemovalAndPositionHighlightL(
iBrookerListBox,
currentItem,
ETrue);
}
}
}
Kishore