Listbox trouble
Posted: Sat Jul 16, 2005 08:04
I hate to sound like a moron here, but i have been unable to figure out how to allow someone to actually select an item in a list box.
i have this code to actually interface with teh list (non-multi select)
inside a buttonPRess event.
im assuming, since i cant seem to select an item, that there must be an event i have to subscribe to in order to select an item. I figure thats mouse click, but from there, how do i tell which item has actually been clicked in the list in order to select it?
arg!
thanks for the help in advance...
i have this code to actually interface with teh list (non-multi select)
Code: Select all
std::string objName;
CEGUI::ListboxItem *t;
t=objectsList->getFirstSelectedItem();
if(!t)
return false;
objName=t->getText().c_str();
currentBody=mPhysicsWorld->getBody(objName);
update();
inside a buttonPRess event.
im assuming, since i cant seem to select an item, that there must be an event i have to subscribe to in order to select an item. I figure thats mouse click, but from there, how do i tell which item has actually been clicked in the list in order to select it?
arg!
thanks for the help in advance...