kannan465
Level 2

Staying with current Dialog box when Next button clicked for some condition

I have a custom dialog box with multiple check boxes, if user does not select any check box and clicking Next, it should popup a message saying that atleast select one and prevent going to next dialog box. I created custom action and my installscript posts message box, but clicking on 'OK' button of this message box going to next dialog box. But I want to stay with current dialog box. I am triggering this custom action in DoAction event of Next button.

Please let me know how do I stay with current dialog box after displaying message.

Thanks in advance.
Labels (1)
0 Kudos
4 Replies
MichaelU
Flexera
Flexera

It sounds like you're using a Basic MSI. If that's the case, you will need to put a condition on the NewDialog event on that same Next button, and control whether that condition is true by setting properties in your InstallScript code.

As an aside, you should strongly consider using MsiProcessMessage rather than MessageBox when in an MSI project, if you aren't already, as it will ensure the message window is properly parented and more likely to get focus.
0 Kudos
kannan465
Level 2

MichaelU wrote:
It sounds like you're using a Basic MSI. If that's the case, you will need to put a condition on the NewDialog event on that same Next button, and control whether that condition is true by setting properties in your InstallScript code.

As an aside, you should strongly consider using MsiProcessMessage rather than MessageBox when in an MSI project, if you aren't already, as it will ensure the message window is properly parented and more likely to get focus.


Thanks Michael.
0 Kudos

Hi

 

Can you please pass here some example.

 

you issue seems same as i'm looking for.

stay on same dialog when pressing next when condition is true.

Thanks

0 Kudos
Nick_Umanski
Level 7

The warning dialog box should be generated with a "SpawnDialog" event (as opposed to a "NewDialog").  That will leave the originating dialog in play.  Then when you click the OK button it's behaviour event needs to be set to EndDialog|Return

0 Kudos