Insert image in listbox?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

geniephics
Just popping in
Just popping in
Posts: 8
Joined: Wed Nov 05, 2008 08:38

Insert image in listbox?

Postby geniephics » Mon Nov 10, 2008 14:32

Hi,

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

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Postby Jamarr » Mon Nov 10, 2008 16:35

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

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Tue Nov 11, 2008 09:40

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.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 23 guests