elver
Posts: 29
Joined: Thu Oct 11, 2007 9:50 am

checkbox clearing using an event or a control condition

Hi,

I have a dialog with a checkbox that may be enabled or disabled according to certain conditions. When the user ticks this checkbox and then modify other options, I want to clear the checkbox and disable it. I can disable it using a control condition, but I can't figure out how to uncheck it. I tried a control condition with "Default" as action. I also tried a published event with setProperty to set a "null" value to the property attached to the checkbox, but these solutions don't work.

regards
laurent
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
When the user ticks this checkbox and then modify other options, I want to clear the checkbox and disable it. I can disable it using a control condition, but I can't figure out how to uncheck it.
I'm not sure I understand what you mean. Do you want to uncheck a checkbox after it has been disabled? Note that this cannot be done.

The only way to re-enable the checkbox is to use a Control Condtion for enabling it. This control condition will use a public property set by another control or by a custom action.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
elver
Posts: 29
Joined: Thu Oct 11, 2007 9:50 am

Hi,

Actually, I need to "programmaticaly" uncheck the checkbox in order it does no longer appear as checked (It's not a problem to do it before disabling the checkbox). My problem is that I don't know what's the right way to do that. As I wrote, I tried to reset the value of the associated property, but as long as the property has a value (even null, "" or blank), the checkbox remains checked.
Looking at the installer logs, I found that when a checkbox is unchecked using the mouse, the installer deletes the associated property. How can I reproduce this behaviour with an event?

regards
laurent
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

This can be done by setting the property of the checkbox. In order to check it you set the property to a value (it doesn't matter what) and to uncheck it you set the property to an empty value (for example to the value of a new property which is empty by default).

If encounter problem contact me at support at advancedinstaller dot com and I shall send you a sample project.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
elver
Posts: 29
Joined: Thu Oct 11, 2007 9:50 am

Hi,

I finally suceeded to uncheck my checkbox using another empty property as you suggested! However, it's not very convenient and maybe you could improve this point (for ex make available a special argument "null" in setProperty events) in a future release...

Anyway, thank you very much for your efficient help.

regards
laurent
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

We will consider improving the available options for the properties of dialog controls in a future version of Advanced Installer.

Thank you for your suggestion.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”