Setting default values in a Dialog

Got a problem you cannot solve? Try here.
seanmckenna
Posts: 46
Joined: Tue Aug 22, 2006 9:16 am
Location: NorthEast, USA
Contact:

Setting default values in a Dialog

Postby seanmckenna » Thu Aug 31, 2006 11:05 am

I am re-working my setup type dialog and I added some checkboxes. I would like the checkboxes to be checked by default. I have selected "checked = true" for each control, and when I test the dialog in the editor, it works. But when I run my installation, none of the check boxes are checked. Anyone know how to do this?

Another question: does anyone know if its possible to persist the state of the checkboxes, so if I click next, then back, I will end up with the same options selected? I sort of half hopped it would just work, but it doesn't seem to be. Is there a simple way to make this happen?

Thanks.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Aug 31, 2006 2:20 pm

Hi Sean,

This is pretty straightforward. As the dialog editor suggests, first make sure you have associated the control with a variable, and that you have defined the variable using the Set Variable command.

Also, in the Set Variable command, set the value to TRUE, since you want the check-box to be checked when starting. For an edit control, you could simply set the variable to the exact string you would like displayed in the control, and so on.

Then, the variable will automatically change its value as the user interacts with the control its bound to on the wizard dialog, and the values will properly persist when moving between dialogs.

If you want to persist the values of variables between setup sessions, make sure to check the "persistent" option in the Set Variable command. This way you do not need to manually load/save variable values each time setup starts.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

seanmckenna
Posts: 46
Joined: Tue Aug 22, 2006 9:16 am
Location: NorthEast, USA
Contact:

Postby seanmckenna » Thu Aug 31, 2006 8:23 pm

Ha, of course. That makes sense, thanks!


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 45 guests