set all elements in checklist to on depending on checkbox

Having trouble running Advanced Installer? Got a bug to report? Post it all here.

set all elements in checklist to on depending on checkbox

Postby mheckmann » Mon Jul 30, 2012 6:39 pm

Hello,

I wonder how to select/deselect all elements of a CheckList Control via a single additional CheckBox control.

Thx
Markus
mheckmann
 
Posts: 52
Joined: Wed Apr 20, 2011 6:24 pm

Re: set all elements in checklist to on depending on checkbo

Postby Daniel » Tue Jul 31, 2012 7:41 am

Hello Markus,

In order to achieve this you can proceed like this:
- Go to "Dialogs" page and add a new dialog to your project.
- Add a check list control like this:
    Property Name: CHECK_LIST
    Values Separator: |
- Select the check list and from its context menu choose "Control Data..." option. In the "Control Data" dialog add the following items using [New...] button:
    Text: first
    Value: 1

    Text: second
    Value: 2

    Text: third
    Value: 3
- Add a check box control like this:
    Property: CHECK_BOX
    Value: checked
- Select the check box control and add two "Set installer property value" published events like this:
    Name: [CHECK_LIST]
    Argument: 1|2|3
    Condition: CHECK_BOX = "checked"

    Name: [CHECK_LIST]
    Argument: ""
    Condition: CHECK_BOX <> "checked"
- Build and run your project.

Let us know if this helped.

All the best,
Daniel
Daniel Radu
Advanced Installer Team
http://www.advancedinstaller.com/
Daniel
 
Posts: 2067
Joined: Mon Apr 02, 2012 1:11 pm

Re: set all elements in checklist to on depending on checkbo

Postby mheckmann » Tue Jul 31, 2012 5:53 pm

Thx Daniel,

that works great - now is the checkbox actually a tristate checkbox?
Similar to other installers I would like the checkbox to go into a 3rd state once any item but not all items are selected in the checklist.
I also came across the problem there that the checklist does not have an option to add Published Events?

Thx for your help
Markus
mheckmann
 
Posts: 52
Joined: Wed Apr 20, 2011 6:24 pm

Re: set all elements in checklist to on depending on checkbo

Postby Daniel » Wed Aug 01, 2012 10:01 am

Hello Markus,

that works great - now is the checkbox actually a tristate checkbox?
Similar to other installers I would like the checkbox to go into a 3rd state once any item but not all items are selected in the checklist.

No, the check box is a two-state control. I'm afraid you cannot obtain this behavior.

I also came across the problem there that the checklist does not have an option to add Published Events?

Unfortunately, you cannot have a published event set for a check list control.

All the best,
Daniel
Daniel Radu
Advanced Installer Team
http://www.advancedinstaller.com/
Daniel
 
Posts: 2067
Joined: Mon Apr 02, 2012 1:11 pm


Return to Common Problems

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests