Radio Button Selection - Disable If - Advanced Installer Community
albadigital
Posts: 10
Joined: Wed Feb 17, 2016 10:36 am

Radio Button Selection - Disable If

Hi,

I have a radio button group called - RADIOBUTTONGROUP_1_PROP, which has two radio buttons - OPTION_1 and OPTION_2.

Depending on what the user selects, I want the Feature List tree to only display certain options, so on the Organization page, I've put the following condition on the 'Disable if' line.

Disabled if - RADIOBUTTONGROUP_1_PROP="OPTION_1"

But this doesn't appear to be working, because if I select OPTION_1 radio button, this Feature isn't disabled.

Can you help, please.

Regards,
Cal
albadigital
Posts: 10
Joined: Wed Feb 17, 2016 10:36 am

Re: Radio Button Selection - Disable If

On further inspection, it looks like it's unselecting them from the feature tree, but I need them hidden, as I though Disabling them hid them from the Feature Tree.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Radio Button Selection - Disable If

Hi Cal,

This is happening because the UpdateFeatureInstallState action that is used to update the feature state is not working with the Disabled if state IF the condition is changed on the UI.

However, you can create your own custom feature selection dialog as explain in the How to show a custom feature selection dialog? article.

Note that you can hide/display a control through the Edit Control Condition Dialog.

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
albadigital
Posts: 10
Joined: Wed Feb 17, 2016 10:36 am

Re: Radio Button Selection - Disable If

Hi Dan,

Thanks for the reply, but it's not really the answer I'm looking for, I don't think.

The Feature Selection I have is on a 'CustomizeDlg' which has a Quick Selection Tree. So is this not already a custom feature selection?

If you could perhaps go in to more detail as to what I need to do to configure this custom feature selection dialog. The tutorial seems to mention the following:
in the end you'll need to define the features for your project in the Organization Page:
"Feature A" with the Identifier FeatureA and condition RADIO = "RadioFeatureA"
"Feature B" with the Identifier FeatureB and condition RADIO = "RadioFeatureB"
"Feature C" with the Identifier FeatureC and condition RADIO = "RadioFeatureC"
but where do I set this condition?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Radio Button Selection - Disable If

Hello,

First of all I apologize for my delay reply.
The Feature Selection I have is on a 'CustomizeDlg' which has a Quick Selection Tree. So is this not already a custom feature selection?
As I said, the UpdateFeatureInstallState action that is used to update the feature state is not working with the Disabled if state IF the condition is changed on the UI. The Quick Selection Tree is an improvement to the simple Selection Tree. The regular Selection Tree control offers a drop-down menu for each feature where you select whether that feature will or will not be installed. The Quick Selection Tree control replaces the drop-down menu with checkboxes.
If you could perhaps go in to more detail as to what I need to do to configure this custom feature selection dialog.
What I recommended to you is to create your own feature selection dialog, using the Dialog editor and simulate a feature selection control.

The sample project is attached to this thread, so if you are interested to take a look directly at my project, you are more than welcome to download the ZIP file.

To simulate the conditions where a feature will be hidden from the feature selection dialog, I had added a checkbox. I use the property attached to the related checkbox in order to display or hide the feature from the custom feature selection dialog. For this, I'm using Control Conditions, as you can see below:
ControlConditions.png
ControlConditions.png (42.85 KiB) Viewed 6476 times

Each feature from the Organization page will be installed if the corresponding checkbox was enabled, otherwise, the feature will not be installed, see below:
FeatureProperties.png
FeatureProperties.png (27.12 KiB) Viewed 6476 times
Please let me know if you have any questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
albadigital
Posts: 10
Joined: Wed Feb 17, 2016 10:36 am

Re: Radio Button Selection - Disable If

Thanks Dan, I'll look through this and see if it's something I can implement.

Kind regards,
Cal
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Radio Button Selection - Disable If

You're welcome Cal,

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”