How can I change the font colour and type of a string in WiX in one of the standard dialogs?
Asked Answered
C

2

13

Is there a simple way to change the font colour and (preferably) font type for one of the strings in one of the standard UI dialogs in Wix?

I'd prefer not to copy and paste the entire dialog source code into my file.

For example, in the welcome dialog I want to keep WelcomeDlgTitle and WelcomeDlgDescription the same, just change the font colour to white.

Capful answered 23/12, 2009 at 19:0 Comment(0)
T
32

Easily, you just need to define a new TextStyle in white color, e.g.

<TextStyle Id="White8" FaceName="Tahoma" Size="8" Red="255" Green="255" Blue="255"  />
<TextStyle Id="White12" FaceName="Tahoma" Size="12" Red="255" Green="255" Blue="255"  />

And then update the strings you want to change to use that style, e.g.

<String Id="WelcomeDlgDescription">{\White8}The Setup Wizard will install [ProductName] on your computer. Click Next to continue or Cancel to exit the Setup Wizard.</String>
<String Id="WelcomeDlgTitle">{\White12}Welcome to the [ProductName] Setup Wizard</String>
Tours answered 29/12, 2009 at 2:54 Comment(2)
Is there any way to change the colour without specifying the string as this will break the localization of WiX .msi as the string will be set to English :(Raynard
It would be really helpful to us newbies, to put this in context: <WixLocalization> <String> ... </String> </WixLocalization> goes in a separate .WXL file, and this goes in the .WXS file: <Product> <UI> <TextStyle/> </UI> </Product>Twotime
R
2

It would be great if the element provided the "font" attribute directly, and would just set the color on that particular text element as mentioned above. Embedding the font change into the string has some interesting possibilities, but might not be used by many at all, and could still be supported by just allowing the font attribute to specify the default font, and then embedded font changes would override that one.

Reilly answered 24/10, 2013 at 17:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.