Initialise a wix CheckBox's check state based on a property?
        Posted  
        
            by MauriceL
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by MauriceL
        
        
        
        Published on 2010-06-14T19:17:58Z
        Indexed on 
            2010/06/14
            19:22 UTC
        
        
        Read the original article
        Hit count: 183
        
wix
How does one initalise a Wix check box based on the value of a property?
So far, I've done the following:
<Control Id="Checkbox" Type="CheckBox" X="0" Y="0" Width="100" Height="15" Property="CHECKBOX_SELECTION" Text="I want this feature" CheckBoxValue="1" TabSkip="no">
 <Condition Action="hide">HIDE_CHECKBOX</Condition>
  <Condition Action="show">NOT HIDE_CHECKBOX</Condition>
</Control>
Currently I have two custom actions to set HIDE_CHECKBOX and CHECKBOX_SELECTION. The CHECKBOX_SELECTION custom action occurs immediately after the HIDE_CHECKBOX action.
What I'm seeing is that HIDE_CHECKBOX is behaving correctly (ie. the checkbox is hidden) which suggests that I've got the ordering of custom actions correct, but CHECKBOX_SELECTION is not changing the check state of the check box. Is this a safe assumption? Also, I've confirmed that SELECTION is being set to '1' in the logs.
© Stack Overflow or respective owner