繁体   English   中英

选择单选按钮时如何取消选中复选框

[英]How to uncheck a CheckBox when a RadioButton is selected

我正在处理WiX安装程序。

我有这个CheckBox控件:

<Control Type="CheckBox" Id="OfficePluginsEnabledCheckbox" Width="107" Height="17" X="11" Y="114" Text="Enable Installed Add-ins" Property="OFFICEPLUGINSENABLED" CheckBoxValue="1"/>

我有这个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>

RadioButtonGroup中的None被勾选时,我试图取消选择OfficePluginsEnabledCheckbox 如上所示,我尝试发布OFFICEPLUGINSENABLED属性。 但是,这不起作用,因为OFFICEPLUGINSENABLED中“ None ”时,实际上从未发布过OFFICEPLUGINSENABLED 为什么会这样,如何实现所需的功能?

您在上面的脚本中缺少value属性。 请尝试以下操作:

<Publish Property="OFFICEPLUGINSENABLED" Value="0"><![CDATA[INSTALLADDINKEYS="None"]]></Publish>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM