I have a radio button group and checkbox overlaying a white background bitmap. The radio buttons and checkbox appear with what look like the default background control color (gray). Is there a way to change the background color of these controls to be white in wix?
Asked
Active
Viewed 2,027 times
7
-
is it duplicate question? like this one? [this] (http://stackoverflow.com/questions/6662650/change-background-color-of-a-radio-button) – 7alhashmi Mar 28 '13 at 09:27
-
2@7alhashmi, nope, it has nothing to do with CSS - it's Windows Installer UI – Yan Sklyarenko Mar 28 '13 at 09:36
-
@zhoulinWang Hi, what did you end-up doing for this? even if I implement the answer suggested, the corner of the radio button is still gray and looks ugly. – Shintaro Takechi Oct 10 '17 at 23:51
1 Answers
4
Afraid not, this is a well known limitation of WiX. Basically both the checkbox and the radio buttons do not support transparency so will default to the grey background.
The workaround is to either change the background Bitmap to suit the grey background of those controls, or to Create the radio/checkbox buttons with no text, and then create transparent text labels right next to them where the text should be. The only downside is that the control can no longer be selected or deselected by clicking the text.
Here is a small example of the second suggestion applied to a checkbox control:
<Control Id="LaunchCheckBox" Type="CheckBox" X="134" Y="126" Width="10" Height="10" Property="LAUNCHAPPONEXIT" CheckBoxValue="1" Text=" " >
<Condition Action="show">NOT Installed</Condition>
</Control>
<Control Id="LaunchText" Type="Text" X="149" Y="126" Width="170" Height="17" Text="Launch $(var.ProductNameForDisplay)" Transparent="yes" >
<Condition Action="show">NOT Installed</Condition>
</Control>

Adam
- 2,762
- 1
- 30
- 32