[wix-users] Check a Checkbox control based on two other checkboxes

Russell Haley russ.haley at gmail.com
Thu Feb 8 09:30:43 PST 2018


On Thu, Feb 8, 2018 at 8:46 AM, Ven H via wix-users
<wix-users at lists.wixtoolset.org> wrote:
> I have a UI Dialog in which I have 3 checkboxes for installing features.
> All, App and DB. I have 3 requirements
> 1. If All is checked, both App and DB have to be checked,
> 2. If App or DB is unchecked, All will be unchecked,
> 3. If both App and DB are checked, All will have to be checked.
>
> I am able to achieve 1 and 2 above, but not able to achieve the 3rd case.
> Can anyone please help? I have given the code below. Also, I am not able to
> completely understand the meaning of Value={}

As you have three mutually exclusive options, perhaps three radio
buttons would be more appropriate? That would eliminate the need to
update the value of the "all" checkbox.

* Full Installation
* Application Installation
* Database Installation

For What It's Worth,

Russ

> <Control Id="ControlAllFeature" Type="CheckBox" X="180" Y="33" Width="140"
> Height="17"
>     Property="ALLFEATURES_CHECKED" CheckBoxValue="AllFeatureValue"
> Text="Install Everything">
>           <Publish Property="APPFEATURE_CHECKED" Value="AppFeatureValue"
> Order="1">ALLFEATURES_CHECKED</Publish>
>           <Publish Property="APPFEATURE_CHECKED" Value="{}" Order="2">NOT
> ALLFEATURES_CHECKED</Publish>
>           <Publish Property="DBFEATURE_CHECKED" Value="DBFeatureValue"
> Order="3">ALLFEATURES_CHECKED</Publish>
>           <Publish Property="DBFEATURE_CHECKED" Value="{}" Order="4">NOT
> ALLFEATURES_CHECKED</Publish>
>           <Publish Property="ALLFEATURES_CHECKED"
> Value="AllFeatureValue">APPFEATURE_CHECKED = 1 and DBFEATURE_CHECKED =
> 1</Publish>
>         </Control>
>         <Control Id="ControlAppFeature" Type="CheckBox" X="191" Y="50"
> Width="140" Height="17"
>      Property="APPFEATURE_CHECKED" CheckBoxValue="AppFeatureValue"
> Text="Install Application">
>           <Publish Property="ALLFEATURES_CHECKED" Value="{}" Order="1">NOT
> APPFEATURE_CHECKED</Publish>
>         </Control>
>         <Control Id="ControlDBFeature" Type="CheckBox" X="191" Y="67"
> Width="140" Height="17"
>            Property="DBFEATURE_CHECKED" CheckBoxValue="DBFeatureValue"
> Text="Install DB">
>           <Publish Property="ALLFEATURES_CHECKED" Value="{}" Order="1">NOT
> DBFEATURE_CHECKED</Publish>
>         </Control>
>
>
> Regards,
> Venkatesh
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list