Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set Checkbox selected by default in Wix

Tags:

wix

I am using a Checkbox and Skip a dialog box based on the check box is selected or not.

The below code for Checkbox

<Control Id="CheckBox_Samples" Type="CheckBox" X="172" Y="225" Width="274" Height="26" Property="INSTALLSAMPLES" Text="Install Samples" CheckBoxValue="TRUE" TabSkip="no" />

The below code to Skip the Dialog box.

<Control Id="Next" Type="PushButton" X="372" Y="348" Width="56" Height="17" Text="[ButtonText_Next]" Default="yes">
  <Publish Event="SetTargetPath" Value="APPDIR">INSTALL</Publish>
  <Publish Event="NewDialog" Value="NewDialog_1">INSTALL AND INSTALLSAMPLES</Publish>
  <Publish Event="NewDialog" Value="SetupTypeDlg">INSTALL AND (NOT INSTALLSAMPLES)</Publish>
</Control>

All are working fine. But the Check box always unselected by default. I want to show the Check box Selected by default.

like image 639
Vinoth Avatar asked Dec 31 '11 11:12

Vinoth


1 Answers

Controls are tied to properties so if you give the properties values, they'll show up as the default content/setting. Did you try to set your INSTALLSAMPLES property to TRUE before showing your checkbox?

like image 70
Dmitry A. Shashkin Avatar answered Sep 18 '22 00:09

Dmitry A. Shashkin