I'd like to display a different picture in a dialog if a certain (compiler) variable is set. Is it possible to achieve this? Or do I have to recreate the entire dialog and use script code such as
if Variable MyVar Equals TRUE
Display Dialog: dialog1
else
Display Dialog: dialog2
end
to display the dialog that shows the proper picture?
How to use a variable to select a picture in a dialog?
-
- Posts: 55
- Joined: Tue Jan 09, 2007 12:20 pm
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
What you can do is place both pictures on the dialog, place an additional text field on the dialog and hide it, then set that text field's caption property to, for example, $FLAG$.
Now, in MSIcode, use Set Variable to pre-define FLAG to either TRUE or FALSE (just example values). Do this before showing the dialog.
And, back in the Dialog Editor, you can use Dialog Rules to show one of the pictures and hide the other when the value of the text field's caption (to which you assigned FLAG) is TRUE, and vice-versa. So no need to include two separate dialogs.
Now, in MSIcode, use Set Variable to pre-define FLAG to either TRUE or FALSE (just example values). Do this before showing the dialog.
And, back in the Dialog Editor, you can use Dialog Rules to show one of the pictures and hide the other when the value of the text field's caption (to which you assigned FLAG) is TRUE, and vice-versa. So no need to include two separate dialogs.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
- Posts: 55
- Joined: Tue Jan 09, 2007 12:20 pm
Who is online
Users browsing this forum: No registered users and 98 guests