Page 1 of 1

Insert image in listbox?

Posted: Mon Nov 10, 2008 14:32
by geniephics
Hi,

Is it possible to insert image into listbox item instead of text?

Posted: Mon Nov 10, 2008 16:35
by Jamarr
If you are using a CEGUI::ItemListBox, then you can insert any type of widget (like say, a StaticImage) into the listbox. To do this, you'll need to create a new widget that derives from CEGUI::ItemEntry.

There is an example on the wiki for putting a checkbox into a listbox to get you started: Create a CheckListboxItem

Posted: Tue Nov 11, 2008 09:40
by CrazyEddie
And if you're using the older CEGUI::Listbox, that takes CEGUI::ListboxItem objects (the ones you create directly, and not via the WindowManager), you can create a subclass of CEGUI::ListboxItem that draws an image, or anything else you choose ;)

CE.