cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
NLough
Level 3

check boxes

Hi

I've created a number of checkboxes on a dialog and wish to set some as checked and others unchecked by default. I'd assumed that if I go to the Property manager, search for the property that was prompted for on creation and set the value ( to either 1 (for checked ) and 0 otherwise)this would be reflected when I build and run. In the properties for the checkbox I include the [property name] under value as suggested in the help under CheckBox properties. Whenever I run they all show checked. Any ideas as to what else needs to be done?

Thanks in advance
Labels (1)
0 Kudos
(2) Replies
Shuttledude
Level 7

Here's a code snippet that will initially select one checkbox, but not the other.
You would put this code inside the while loop of the EzDefineDialog( ) function. Use InstallShield help to find out more about EzDefineDialog( ) if necessary.


// This is the case statement for dialog initialization
case DLG_INIT:
// initially check CheckBox1
// "nickname" is just your dialog's nickname set with EzDefineDialog
CtrlSetState("nickname", CheckBox1, BUTTON_CHECKED);
// initially un-check CheckBox2
CtrlSetState("nickname", CheckBox2, BUTTON_UNCHECKED);
0 Kudos
NLough
Level 3

Thanks for your help

On another forum I found that the corresponding property for the checkbox should be set blank in the Property Manager. I'd previously been trying 1's and 0's as appropriate.

Cheers
0 Kudos