Page 1 of 1
Listbox Item skinning
Posted: Fri Mar 14, 2008 23:49
by prager
One more question for today...
I am trying to sking the Listbox, but couldn't find a way to sking its items - mainly font color. In some old skinning files there is an element called "ListboxItem", which seems to be exactly what I need, but it does not exist in new specs. I tried the "TextColour" property in Listbox, but it doesn't seem to have any effect either.
Many thanks...
Posted: Sat Mar 15, 2008 19:54
by CrazyEddie
Hi,
The 'old style' Listbox (named Listbox) uses non-window based items that are some sub-class of CEGUI::ListboxItem. Most people using this widget also use the subclass CEGUI::ListboxTextItem - these objects are created in code directly and have member functions you can call to set the text colour and font -
see the API ref for that info.
The new and improved ItemListbox uses window based items based on the Window type ItemEntry - these can be skinned via Falagard, and as such you can do pretty much anything you like with them, and examples of this can be seen in the looknfeel xml files supplied with the system.
HTH
CE
Posted: Sat Mar 15, 2008 20:34
by prager
Hi,
many thanks for reply... So, if I got it right, there is no need to skin the old listbox anymore, right? I was trying to change the TaharezLook files provided with Ogre, but they don't seem to be the latest version.
Anyway, many thanks...
Posted: Sun Mar 16, 2008 16:31
by CrazyEddie
Hi,
Items for the old style listbox were never skinnable via XML anyway, so yes it is correct to say that there is no skinning to do for those.
I think the Ogre files are slightly modified versions of the CEGUI 0.5.0 release versions.
CE.