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.
[Solved] Controlling text formatting in lookandfeel
Moderators: CEGUI MVP, CEGUI Team
[Solved] Controlling text formatting in lookandfeel
Last edited by Sairon on Wed Dec 09, 2009 19:29, edited 1 time in total.
Re: Controlling text formatting in lookandfeel
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.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: [Solved] Controlling text formatting in lookandfeel
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.
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.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Who is online
Users browsing this forum: No registered users and 6 guests