MultiColumnList ,ListHeaderSegment,colours question

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

Ken
Just popping in
Just popping in
Posts: 4
Joined: Tue Jun 27, 2006 06:11
Location: ShangHai China

MultiColumnList ,ListHeaderSegment,colours question

Postby Ken » Mon Jul 17, 2006 06:52

how to change the text colour of ListHeaderSegment of MultiColumnList .

it seems there is no property for change it.

anyone have any suggestion?

sorry for my poor english

:?:

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

Postby CrazyEddie » Mon Jul 17, 2006 19:24

You should be able to do this by adding a PropertyDefinition to the ListHeaderSegment component in the looknfeel, and then referencing that as a ColourProperty in the Section specifications for the label.

So, at the top of the WidgetLook you would add something like:

Code: Select all

<PropertyDefinition name="LabelTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />


Then further down, in the StateImagery specifications, where you see the 'label' section specified, change those to something like:

Code: Select all

<Section section="label">
        <ColourProperty name="LabelTextColour" />
</Section>


This attaches the defined property to the rendering of the 'label' section and whatever colour is set in the property will be used for rendering the label. The ColourProperty could alternatively be specified in the ImagerySection for 'label', though the approach shown is more flexible (you could have multiple colours for the various different states this way).

Unfortunately ou can't access this propery from the layout files, due to a limitation of the way that columns are expressed at present. However, you can set it in code via the usual 'setProperty' member for Window.

HTH

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 6 guests