set all elements in checklist to on depending on checkbox - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

mheckmann
Posts: 74
Joined: Wed Apr 20, 2011 6:24 pm

set all elements in checklist to on depending on checkbox

Hello,

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

Thx
Markus
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

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

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
Follow us: Twitter - Facebook - YouTube
mheckmann
Posts: 74
Joined: Wed Apr 20, 2011 6:24 pm

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

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
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

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

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
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”