I did some searching threw the forum and I can't really find anything that is helping me. I have also looked threw the api ref and I am not sure what the best way to use listboxes.
I am creating the listbox item with and id:
Code: Select all
CEGUI::ListboxTextItem *listboxitem = new CEGUI::ListboxTextItem( text, id );
List->addItem(listboxitem);
That works great, now what I am having problems with is deleting the item. Is there anyway to delete based on the id. Something like:
Code: Select all
List->deleteItem( id );
Also do I have to delete the item myself
Code: Select all
CEGUI::ListboxTextItem *item = List->getItem( id );
delete item;
item = ;
List->deleteItem( id );
Ohh, one last question when I select an item can i get it to return the key I gave it or just the text.
Thanks, Ben