[Solved] Controlling text formatting in lookandfeel

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

Sairon
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Sun Dec 07, 2008 01:11

[Solved] Controlling text formatting in lookandfeel

Postby Sairon » Wed Dec 09, 2009 14:35

Hi,

I'm trying to change how WindowsLook/StaticText aligns the text. If I create an instance of WindowsLook/StaticText in a layout file and add: <Property Name="HorzFormatting" Value="HorzCentred" /> as a property, then it will correctly center the text. However, if I add the very same property under <WidgetLook> in the lookandfeel nothing happens. I was under the impression that you could create defaults using this method but I seem to either be doing something wrong or misunderstood. Looking in the manual HorizontalTextFormat is mentioned, however, the enumerations are mentioned without much context and I've tried to search for a usage of HorizontalTextFormat without much luck.
Last edited by Sairon on Wed Dec 09, 2009 19:29, edited 1 time in total.

Sairon
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Sun Dec 07, 2008 01:11

Re: Controlling text formatting in lookandfeel

Postby Sairon » Wed Dec 09, 2009 19:28

Found the problem it seems, although I don't quite understand the reasoning behind it. In the lookandfeel attributes needs to be completely lower case, while in the layout the first letter must be capital. So, in the lookandfeel it should be <Property name="HorzFormatting" value="HorzCentred" /> in order to work correctly.

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

Re: [Solved] Controlling text formatting in lookandfeel

Postby CrazyEddie » Thu Dec 10, 2009 10:05

Hi,

Yeah sorry for the confusion caused by this inconsistency. Really I'd like all attribute names to be lower case as in the looknfeel, I really hate the fact I went with capitalised names in the other files.

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 18 guests