【问题标题】:How to uncheck a CheckBox when a RadioButton is selected选择 RadioButton 时如何取消选中 CheckBox
【发布时间】:2015-04-24 19:33:33
【问题描述】:

我正在处理一个 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>

NoneRadioButtonGroup 中打勾时,我正在尝试取消选择OfficePluginsEnabledCheckbox。如上所示,我已尝试发布 OFFICEPLUGINSENABLED 属性。但是,这不起作用,因为当None 被勾选时,OFFICEPLUGINSENABLED 从未真正发布过。为什么会这样?如何实现我想要的功能?

【问题讨论】:

    标签: .net xml checkbox wix installation


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2010-11-25
      • 2016-01-21
      • 1970-01-01
      • 1970-01-01
      • 2017-03-12
      • 1970-01-01
      • 2017-04-04
      • 1970-01-01
      • 2021-09-25
      相关资源
      最近更新 更多