I'm using a customized version of thmutil theme for my Wix installer. For various reasons I want to right-align two text boxes ().
I can set the right end of the boxes but I cannot align the text so that it appears right-aligned.
Is there a way to modify the theme to support setting text alignment to left|center|right?
I thnk of an atribute like RightAligned="yes".
<Text X="-11" Y="11" Width="190" Height="30" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Text>
<Text X="-11" Y="40" Width="120" Height="17" FontId="3" Visible="yes" DisablePrefix="yes" HideWhenDisabled="yes">#(loc.InstallVersion)</Text>
It is actually simple, but not directly documented. You can do it by adding the attribute HexStyle="00000002" to the Text element. This value corresponds to the Win32 constant SS_RIGHT which aligns a static text control content to the right.
Actually, you can do quite a lot of fancy stuff just with styles. Making borders, auto text ellipsis, and stuff...
For reference, here is a handy list of values for control styles and other constants: https://github.com/wine-mirror/wine/blob/master/include/winuser.rh. Of course you can also find this somewhere in the windows headers files.
I used RightAligned="yes" attribute to align value in Text control to the right. (Wix Toolset v3.11)
<Control Id="ErrorLabel" Type="Text" X="30" Y="221" Width="300" Height="10" RightAligned="yes" Text="{\WixUI_Font_Error}!(loc.MissingValueError)">
<Condition Action="hide" >NOT UI_VALUE_INVALID</Condition>
<Condition Action="show" >UI_VALUE_INVALID</Condition>
</Control>
Related
How can I add a message to the successfully uninstalled page of a Burn bundle?
I am using HyperlinkSidebarLicense of the WiX standard bootstrapper application and use a copy of the default theme (at src\ext\BalExtension\wixstdba\Resources\HyperlinkSidebarTheme.xml):
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkSidebarLicense">
<bal:WixStandardBootstrapperApplication
LicenseUrl=""
ThemeFile="Theme.xml"
LocalizationFile="Theme.wxl" />
</BootstrapperApplicationRef>
I then modified the Success page by adding a Text:
<Page Name="Success">
...
<Text Name="SuccessUninstallMessage" X="185" Y="110" Width="-11" Height="40"
FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessMessage)</Text>
...
</Page>
However the modified Success page is also shown during installation (in addition to uninstall), which I don't want.
How can I show a message only during uninstall on the Success page?
That's not supported in WixStdBA in WiX v3.x. WixStdBA has code to show different messages based on the action and it only does that for the header text (SuccessHeader, SuccessInstallHeader, SuccessRepairHeader, and SuccessUninstallHeader).
In WiX v4.0 (not yet in beta), themes can conditionally control the text shown without requiring supporting code in WixStdBA:
<Label X="0" Y="250" Width="-0" Height="20" FontId="1" Center="yes">
<Text Condition="WixBundleAction = 5">#(loc.SuccessInstallMessage)</Text>
<Text Condition="WixBundleAction = 6">#(loc.SuccessInstallMessage)</Text>
<Text Condition="WixBundleAction = 7">#(loc.SuccessRepairMessage)</Text>
<Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallMessage)</Text>
</Label>
Am developing an installer for my application using wix installer.installer. Wix is really new to me .
In that installer am having a custom dialog and where i have kept check boxes inside it.
<Control Id="InstallWORD" Type="CheckBox" X="20" Y="200" Width="200" Height="17" Property="INSTALLWORD" CheckBoxValue="1"
Text="Install Word Plug-In?" />
the above is the code i used for keeping check box. But now i need to insert a small picture near the checkbox (ie)
similar like this
how to make it possible in wix installer??
Thanks .
Need to add a Binary element to the file:
<Binary Id="MainImage" SourceFile="Resources/Images/weblabel.jpg" />
...and to set the Text of the Bitmap Control to "MainImage":
<Control Id="Bitmap"
Type="Bitmap"
X="0"
Y="0"
Width="258"
Height="185"
TabSkip="no"
Text="MainImage" />
and for adding a group box
<Control Id="grpBox" Type="GroupBox" X="8" Y="50" Width="355" Height="210" Text="Add-in for Microsoft Office" ></Control>
and now it works. :)
in my setup project I'd like to customize the Progressbar and give it a different color. I use the default theme xml. This is the progress page i modified:
<Page Name="Progress">
<Image X="11" Y="20" Width="485" Height="300" ImageFile="logo.png" Visible="yes"/>
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Text>
<Text X="11" Y="121" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Text>
<Text Name="OverallProgressPackageText" X="85" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Text>
<Progressbar ImageFile=".\test.bmp" Name="OverallCalculatedProgressbar" X="21" Y="168" Width="-21" Height="33" />
<Button Name="ProgressCancelButton" X="-11" Y="-11" Width="85" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
</Page>
In the Progressbar tag, I added the ImageFile attribute. The file test.bmp is in the same directory as the theme.xml.
The ImageFile help says the following:
Relative path to an image file for the control. The image must be 4 pixels wide: left pixel is the left side of progress bar, left middle pixel is progress used, right middle pixel is progress unused, right pixel is right side of progress bar. Mutually exclusive with ImageResource and SourceX and SourceY attributes.
The bmp is 4 pixels wide (all pixels are black), but the progress bar is still the default windows color (Win7 with Aero: green). I neither use ImageResource nor SourceX and SourceY attributes (as the documentation requires).
Can anyone help me with this? Did I miss something, or did I misunderstood something?
Most likely thmutil is failing to load your .\test.bmp. Most likely the file is missing. If the file cannot be loaded, it silently skips the failure and will revert back to the system progress bar.
To ensure that the .\test.bmp can be found, I would first recommend removing from the .\ path and then ensure the file is included as a Payload in your BootstrapperApplication element. For example:
<Bundle ...>
<BootstrapperApplication SourceFile='path\to\ba.dll'>
<Payload SourceFile='path\to\custom.thm' />
<Payload SourceFile='path\to\test.bmp' />
</BoostrapperApplication>
</Bundle>
That will add the file test.bmp to the list of BootstrapperApplication payloads. If you are using wixstdba, it would look more like:
<Bundle ...>
<BootstrapperApplicationRef Id='WixStandardBootstrapperApplication.RtfLicense'>
<bal:WixStandardBootstrapperApplication ThemeFile='path\to\custom.thm' />
<Payload SourceFile='path\to\test.bmp' />
</BoostrapperApplication>
</Bundle>
I have defined the TextStyle as
<TextStyle Id="subHeadingFont" FaceName="Tahoma" Size="9" Bold="yes" Blue="255" Italic="yes" Green="0" Red="0" />
and Later used it in control like this
<Control Id="Password" Type="Edit" X="20" Y="195" Width="150" Height="18" Property="WIXUI_SA.PASSWORD" Indirect="yes" Text="{\subHeadingFont}" ToolTip="Password Dude"/>
On the UI I don't get the text in Blue, any pointers what did I do wrong here?
it seems its not possible to change the color of "edit" control
Ref: http://msdn.microsoft.com/en-us/library/aa372074(v=vs.85).aspx
This column specifies the text color displayed by a Text Control. All other types of controls always use the default text color.
I was looking through a bug reported with some of my work's installer code yesterday and found that right click doesn't open a context menu for any of our installers.
The context menu is displayed for password boxes, so paste of me thinks it's a setting I missed when ploughing through the documentation, but I've not seen anything on google.
Is it a bug? Missing setting or a design feature?
Code is very simple and like this:
(Working Case: Password Box)
<Control Id="Label2" Type="Text" X="15" Y="123" Width="85" Height="18" Transparent="yes" Text="Password:" />
<Control Id="Edit2" Type="Text" Password="yes" X="100" Y="120" Width="235" Height="18" Property="PASSWORD" Text="[PASSWORD]" ToolTip="The password for the activation service to register the application." />
(Failing Case: Edit or Text Box)
<Control Id="Label1" Type="Text" X="15" Y="103" Width="80" Height="18" Transparent="yes" Text="Username:" />
<Control Id="Edit1" Type="Edit" X="100" Y="100" Width="235" Height="18" Property="ACTIVATIONUSERNAME" Text="[ACTIVATIONUSERNAME]" ToolTip="The username for the activation service to register the application." />
Cheers,
J
P.S I checked WIX 3.5 and the same issue seems to occur.
I've seen many times that MSI wizard does not have context menu in edit boxes. I guess it's the bug (or the feature) of Windows Installer. It subclasses all standard controls, i.e. changes their WndProc to new one, and in this case it may block context menu from appearing, perhaps unintentionally.