ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Set Text Box empty on Check Box checked

Hi Cosmin,

I am facing one issue.

I have check box and two text box.

when checkbox is checked I want to make both text box empty.

Please help me.

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

Re: Set Text Box empty on Check Box checked

Hi Amit,

For example, if the properties of the edit boxes are "EDIT1" and "EDIT2" and the property of the checkbox is "CHECK", you can follow these steps:
- in the Custom Actions page create a new "Update MSI Edit Controls" UI Custom Action
- in the "Dialogs" page select the checkbox
- in the "Control" section select the Published Events tab
- create these control events:

Code: Select all

[EDIT1]           {}                         AI_INSTALL AND EDIT1 AND CHECK
[EDIT2]           {}                         AI_INSTALL AND EDIT2 AND CHECK
DoAction          UpdateMsiEditControls      AI_INSTALL
[EDIT1]           [EDIT1]                    AI_INSTALL
[EDIT2]           [EDIT2]                    AI_INSTALL
For the edit box properties you can use "SetProperty" control events and for the custom action you can use a "DoAction" control event.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Re: Set Text Box empty on Check Box checked

Hi Cosmin,

In "Update MSI Edit Controls" UI Custom Action, do I need to write any thing in Script Text.

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

Re: Set Text Box empty on Check Box checked

Hi Amit,

Please note that "Update MSI Edit Controls" is a predefined UI custom action and it doesn't use a "Script Text" field. You can add it by using the "Add Predefined Custom Action" context menu. After adding it you don't need to modify its settings (you can use the defaults).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Re: Set Text Box empty on Check Box checked

Thanks Cosmin,

It is working.

Amit

Return to “Common Problems”