View Full Version : dialog titles

06-03-2004, 11:14 AM
In the Universal Installer, has anyone figured out how to have each dialog have a different title?

As far as I can tell, I can only change the name of all of the dialogs under one "section", like "Main" "Begin" "Finish", which store a number of dialogs. What I really want is for each dialog to have a title like:

My Product Installation - Choose Components
My Product Installation - License Agreement
My Product Installation - Install Directory


any ideas?


06-03-2004, 11:51 AM
Hi Mike,

There is a way of doing this without writing any code.

You can set the title property of the frame to a variable such as $V(windowTitle). Then in the Installation Sequence, insert a Set Variable wizard action before each Wizard Panel that sets $V(windowTitle) to whatever you like.


06-03-2004, 11:55 AM
thanks - this sounds like exactly what I was looking for. It is a bit of a hack - I wish there were a better way to do it, but it isn't bad at all.

One question, though... what happens if I select "back" during the installation? Do all of teh wizard actions before my dialog get run as well, or will I have the wrong title on my dialogs?

Maybe a better solution would be to use the queryEnter event on each dialog to set the same variable.


06-03-2004, 11:58 AM
You are right, the back condition won't work. It makes more sense to add a line that sets the variable in queryEntry. Also, this way your sequence won't be cluttered.


06-03-2004, 01:52 PM
Come to think of it, how do I set the value of a $V variable in java code in queryEnter?

I can't find a method to do it (although I'm sure you can).


06-03-2004, 01:59 PM
I'd still like an answer to my previous question, b/c I'm sure I'll need it later... But I did find an alternate solution to this problem, which is to have a non-visible,non-enabled text box on every dialog that has the title of the dialog. Then you can do what Mike W suggested earlier - have the dialog title: $V(windowTitle)... and name the hidden, non-enabled text box named "windowTitle", with a "windowTitle" variable set to the title that you want. Works like a charm.


06-03-2004, 02:06 PM
Good idea using an invisible text field. This is a nice solution that doesn't require any custom coding.

You can set a variable with code using something similar to this.
"context" is the context parameter in an event method.

context.getServices().getISDatabase().setVariableValue("variable", "value");

06-08-2004, 01:01 PM
You could also use a Label control on each dialog. You would create a string for each title in the String table, then reference the appropriate string in each dialog's Label Text property.

06-18-2004, 03:45 PM
As it turns out, none of the suggestions mentioned in here actually work to change the dialog title. I actually don't understand the one just before this message, so that very well could work, so more explanation would be helpful.

The two suggestions outlined above by myself and an installshield engineer have a few problems:

1) The concept of using a hidden text box that sets the value of $V(windowTitle) doesn't work, b/c that variable can only have one value through the dialog designer. I can't have a hidden text box that sets that value of windowTitle to xxx on one dialog and then yyy on another - the GUI doesn't allow for it. SO, that means that you need to set the value of the variable through a method in queryEnter....

2) Setting the value of windowTitle inquery enter turns out to be an unworkable solution as well. While you can change the value of the variable as many times as you want with the following:

String sWindowTitle = "foo";
context.getServices().getISDatabase().setVariableValue("windowTitle", sWindowTitle);
LogUtils.getLog().logEvent(this, Log.ERROR, context.getServices().resolveString("$V(windowTitle)"));

The frame for each dialog only seems to rrender once... so you can set the var windowTitle over and over again, but the title will always be what the var was set to after queryEnter is called on the first dialog from a particular frame.

Any other ideas on how to have changing dialog titles, including an explanation of the comment above this one?


08-11-2004, 09:42 AM

i had somehow the same problem...

You need to get somehow the current WizardUI. Because we're running in swing mode, cast it to a SwingWizardUI. Then get the custom frame and set its title.

For an initializeUI event method it looks like this:

public void initializeUIMain(ISDialogFrameContext context) {

SwingWizardUI ui = (SwingWizardUI) context.getWizardUI();
ui.getCustomFrame().setTitle("New Title!");


Of course this means that you have to do this everytime new new dialog appears, but I don't think there's a better solution...



08-11-2004, 12:21 PM
Hi! Just wanted to give my thanks to the author of the suggestion listed above, as it seems to work fine. Thanks again!

08-12-2004, 10:27 AM
Hi All,

Maybe somebody know how to change a dialog title for 5.x dialogs? I have such dialog in my universal product and it have a default name "Installer". How to change it?