Hi Guys,
I have a listbox event coming in. I'm getting separate events for separate listboxes. All is good.
Question:
How do I tell which item in the listbox has been selected? For example, If I have a listbox with "Yes" and "No" items and I select "Yes" to get the event, How do I know this event is for the "Yes" selection. Is there a field in the event coming in with an item # or text value?
I've checked the docs and it doesn't appear obvious unless I'm not seeing it which is entirely possible (likely).
thanks
Kevin
Listbox event question
The event.GUIEvent.Caller can be a pointer to the IGUIElement that generated the message. You can use use getID() to get the ID of the element. If necessary, you can cast the Caller to the appropriate element type so you can call functions on it. If event.GUIEvent.EventType is gui::EGET_LISTBOX_CHANGED you should be able to cast the Caller pointer to an IGUIListBox.
Travis
Travis
right, and with getSelected() you can check witch listbox item is selected...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java