adding to Combobox does nothing (Listbox works however)
Posted: Sun May 01, 2011 06:54
Hi, I have a strange problem with CEGUI 0.7.5. I have a Combobox and want to add a ListboxTextItem to it. I use the code posted below. Adding to the combobox gives no error or warning, it simply does nothing (the box stays empty).
The exaxt same code, only replaced by a Listbox works perfectly.
The exaxt same code, only replaced by a Listbox works perfectly.
Code: Select all
//This works, "MyListbox" is existing and of type CEGUI::Listbox (read from .layout file)
static_cast<CEGUI::Listbox*>(wmgr->getWindow("MyListbox"))->addItem(new CEGUI::ListboxTextItem("Test1"));
//This doesn't work, "MyCombobox" is existing and of type CEGUI::Combobox (read from .layout file)
static_cast<CEGUI::Combobox*>(wmgr->getWindow("MyCombobox"))->addItem(new CEGUI::ListboxTextItem("Test2"));