How to add custom message with alignment in Welcom

2019-08-19 23:35发布

I used this line in wxl file to add custom message but still not able to align the version number properly

  <String Id="WelcomeDlgDescription" Overridable="yes">The Setup Wizard will install [ProductName] on your computer. Click Next to continue or Cancel to exit the Setup Wizard.&#13;&#10;&#13;&#10;&#13;&#10;{\WixUI_Font_Title}Version - [ProductVersion]</String>

I want the results to be like this

enter image description here

Also, I am not able to change the fonts.

Updated

I am able to achieve this. Version left hanging in the middle and not going at the end, enter image description here

1条回答
仙女界的扛把子
2楼-- · 2019-08-19 23:59

Limitation: It looks like you can only have one style per string. I am not sure, but it says in the documentation that you have to refer to the style at the beginning of the string:

<TextStyle Id="Test" FaceName="Arial" Blue="255" Size="12" Strike="yes" />

<..>

<String Id="WelcomeDlgDescription">{\Test}Version - [ProductVersion]</String>

Customizing WiX Dialogs: You might need to change the whole dialog to add two fields so you can put the version number in its own text box featuring its own style. Doing so is a little involved, and I have a description of it here: Customizing WiX Dialogs. Please have a quick read. It also describes how to change font color and style.

Update: Nice little sample for how you can insert a custom dialog: Wix UpgradeVersion.

查看更多
登录 后发表回答