[英]How to uncheck a CheckBox when a RadioButton is selected
I am dealing with a WiX installer. 我正在处理WiX安装程序。
I have this CheckBox
control: 我有这个CheckBox
控件:
<Control Type="CheckBox" Id="OfficePluginsEnabledCheckbox" Width="107" Height="17" X="11" Y="114" Text="Enable Installed Add-ins" Property="OFFICEPLUGINSENABLED" CheckBoxValue="1"/>
I have this RadioButtonGroup
control: 我有这个RadioButtonGroup
控件:
<Control Type="RadioButtonGroup" Property="INSTALLADDINKEYS" Id="AddinKeysRadioButtonGroup" Width="74" Height="45" X="218" Y="131">
<RadioButtonGroup Property="INSTALLADDINKEYS">
<RadioButton Text="All Users" Height="17" Value="AllUsers" Width="200" X="0" Y="0" />
<RadioButton Text="Current User" Height="17" Value="CurrentUser" Width="200" X="0" Y="15" />
<RadioButton Text="None" Height="17" Value="None" Width="200" X="0" Y="30" />
</RadioButtonGroup>
<Publish Property="OFFICEPLUGINSENABLED"><![CDATA[INSTALLADDINKEYS="None"]]></Publish>
</Control>
I am trying to de-select OfficePluginsEnabledCheckbox
when None
is ticked in the RadioButtonGroup
. 当RadioButtonGroup
中的None
被勾选时,我试图取消选择OfficePluginsEnabledCheckbox
。 As shown above, I've tried publishing the OFFICEPLUGINSENABLED
property. 如上所示,我尝试发布OFFICEPLUGINSENABLED
属性。 However this does not work as OFFICEPLUGINSENABLED
is never actually published when None
is ticked. 但是,这不起作用,因为OFFICEPLUGINSENABLED
中“ None
”时,实际上从未发布过OFFICEPLUGINSENABLED
。 Why is this, and how can I achieve my desired functionality? 为什么会这样,如何实现所需的功能?
You are missing a value attribute in your script above. 您在上面的脚本中缺少value属性。 Try the following: 请尝试以下操作:
<Publish Property="OFFICEPLUGINSENABLED" Value="0"><![CDATA[INSTALLADDINKEYS="None"]]></Publish>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.