2016-01-26 158 views
0

这里是我的维克斯维克斯:选中复选框,当另一个复选框被选中

<Control Id="FeatureOneBox" Type="CheckBox" Property="FEATUREONE" Text="Feature One" X="30" Y="87" Height="10" Width="200" CheckBoxValue="1" /> 
<Control Id="FeatureTwoBox" Type="CheckBox" Property="FEATURETWO" Text="Feature Two" X="30" Y="107" Height="10" Width="200" CheckBoxValue="1" /> 
<Control Id="FeatureThreeBox" Type="CheckBox" Property="FEATURETHREE" Text="Feature Three" X="30" Y="107" Height="10" Width="200" CheckBoxValue="1" /> 
<Control Id="CoreFeatureBox" Type="CheckBox" Property="INSTALLCORE" Text="!(loc.CoreFeatureBox)" X="30" Y="147" Height="10" Width="300" CheckBoxValue="1"> 
    <Condition Action="enable"><![CDATA[FEATURETWO <> 1 AND FEATURETHREE <> 1]]></Condition> 
    <Condition Action="disable">FEATURETWO = 1 OR FEATURETHREE = 1</Condition> 
</Control> 

我想要求的核心功能,如果两个或三个选择任一功能。我可以通过更改特征条件来做到这一点,但是,用户不选中这两个选项,取消选中Core,然后重新检查其中的一个,即使其复选框未选中,我也不想安装Core功能。

如何在检查CoreFeatureBox的同时禁用它?

回答

0

如果只有我会多搜索几分钟!

This code是我所需要的:

<Control 
    Id="CB1" 
    Type="CheckBox" 
    Property="myCheckboxResult" 
    CheckBoxValue="my value" 
    Text="Check the box please." 
    X="50" 
    Y="50" 
    Height="10" 
    Width="150"> 

    <Publish Property="myCheckboxResult2" Value="my value" Order="1">myCheckboxResult</Publish> 
    <Publish Property="myCheckboxResult2" Value="{}" Order="2">NOT myCheckboxResult</Publish> 
    </Control> 

<Control 
    Property="myCheckboxResult2" 
    Id="CB2" 
    Type="CheckBox" 
    CheckBoxValue="my value" 
    Text="Check the box please." 
    X="50" 
    Y="70" 
    Height="10" 
    Width="150" /> 

我加入FeatureTwoBoxFeatureThreeBox,一切的工作下<Publish/>节点。

相关问题