jstuardo
Posts: 88
Joined: Mon Nov 09, 2015 10:44 pm

How to use "Display Message Box" custom action when it has YES and NO buttons?

Hello,

I have no found any document about this.

I have a checkbox in a dialog. If that checkbox is checked, I need to show that custom action. If user clicks on YES, next dialog in the wizard should be displayed. If user clicks NO, the same dialog should be kept.

I have added the custom action, but, now what? How can I access the dialog box result as a condition to continue to the next dialog?
DisplayMessageBox.png
DisplayMessageBox.png (38.51 KiB) Viewed 6763 times
By the way, Icon does not allow to be a question mark.

Regards
Jaime
Catalin
Posts: 7845
Joined: Wed Jun 13, 2018 7:49 am

Re: How to use "Display Message Box" custom action when it has YES and NO buttons?

Hello Jaime,

In order to achieve that, you can proceed as it follows:

- add the message box custom action in "Custom Actions" page, without sequence

- in "Dialogs" page, add the new dialog

- add the check box control to your dialog (not the new one, the one preceding the one you've added)

- select the checkbox and under "Published Events" tab, add an event as it follows:

Event: Execute custom action
Argument: MessageBox
Condition: CHECKBOX_1_PROP = "CheckBox"


If the checkbox has other property / default value, please replace them in the above condition.

- now please right click on the dialog you have added at step 2 --> "Show only if". In the condition field, please insert the following condition:

Code: Select all

BTN_PRESSED = "IDYES"
This way, the dialog will only be shown if the user presses "Yes" in the message box custom action. The "Next" button has to be pressed, of course.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jstuardo
Posts: 88
Joined: Mon Nov 09, 2015 10:44 pm

Re: How to use "Display Message Box" custom action when it has YES and NO buttons?

Thanks.... it worked. The difference was that I did not create any new dialog. I just modified condition of "Display specific dialog" event of the current dialog to be:

Code: Select all

BTN_PRESSED = "IDYES"
That way the VerifyReadyDlg is shown only if I answer Yes in the confirmation dialog.

Regards
Jaime
Catalin
Posts: 7845
Joined: Wed Jun 13, 2018 7:49 am

Re: How to use "Display Message Box" custom action when it has YES and NO buttons?

You are always welcome, Jaime!

I am glad it worked.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”