Sandor
Posts: 6
Joined: Sun Apr 20, 2008 9:09 pm

Enable Disable UI Components using a ChackBox

Hi,

on the BrowseDlg I have a CheckBox.
All I want to do is, disable the two components (PathEdit and PuschButton) when unchecking the CheckBox.
and enable them, when checking the CheckBox.
Could you tell me please, how to do that ?

Thanks a Lot.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Enable Disable UI Components using a ChackBox

Hi,

This can be done by using Control Conditions for the Path Edit and button controls. Here are the steps:
- for this example we set the property of the checkbox to CHECK (in the "Property Name" field of the Properties pane)
- select the path edit control on "BrowseDlg" and go to the "Control Conditions" tab
- create these control events:

Code: Select all

NOT CHECK                   Disable
CHECK                       Enable
- do the same for the button

This way, the path edit and button controls will be disabled when the checkbox is unchecked and enabled when the checkbox is checked.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Sandor
Posts: 6
Joined: Sun Apr 20, 2008 9:09 pm

Re: Enable Disable UI Components using a ChackBox

Thank you very much, it works fine !!!
Regards
sandor
Phobos
Posts: 85
Joined: Fri Sep 08, 2006 11:52 am
Location: Germany

Re: Enable Disable UI Components using a ChackBox

Hi,

How can I enable/disable UI components using buttons? I have two buttons "yes" and "no", and I want to use those buttons to enable/disable specific UI components, e.g. the "Next" button. So if I press "yes" the "Next" button is enabled, if I press "no" it's disabled.

Thanks.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Enable Disable UI Components using a ChackBox

Hi,

This can be done by using a custom property and control conditions. Here are the steps:
- go to the "Dialogs" page and select the custom dialog which contains the "Yes" and "No" buttons
- select the "Yes" button and go to the "Published Events" tab
- create this SetProperty control event:

Code: Select all

[MY_PROPERTY]           yes           AI_INSTALL
- select the "No" button and set this control event for it:

Code: Select all

[MY_PROPERTY]           no            AI_INSTALL
- select the "Next" button and go to the "Control Conditions" tab
- create these control conditions:

Code: Select all

MY_PROPERTY="yes"           Enable
MY_PROPERTY="no"            Disable
Let me know if you encounter any problems.
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”