Page 1 of 1

[Solved] Controlling text formatting in lookandfeel

Posted: Wed Dec 09, 2009 14:35
by Sairon
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.

Re: Controlling text formatting in lookandfeel

Posted: Wed Dec 09, 2009 19:28
by Sairon
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.

Re: [Solved] Controlling text formatting in lookandfeel

Posted: Thu Dec 10, 2009 10:05
by CrazyEddie
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.