Page 1 of 1
Display variable lines of text on an installer dialog.
Posted: Sun Jul 05, 2009 8:26 am
by albel
Hi
This is a question about how to display some dynamic text in an installer dialog made in InstallAware 9.
I have a variable number of lines of text to display in a control that must be scrollable (a few short paragraphs). I have tried to use the Memo control, but I've had trouble populating it with text during installation runtime. The documentation isn't clear about this situation. Can someone please provide me with some instructions for using the Memo control during runtime? Or is the Memo control even the proper control to use for my purposes in a dialog at runtime?
Thanks in advance.
Posted: Sun Jul 05, 2009 1:23 pm
by MichaelNesmith
Memo seems suitable, other ones like RichEdit might also be interesting.
Just set the Memo.Lines property to a $VARIABLE$ which holds the desired content to display, this will populate the control at runtime as long as you set the variable before calling Display Dialog. You can also directly load static text into the control using the same property.
Re. Display variable lines of text on an installer dialog.
Posted: Mon Jul 06, 2009 8:18 am
by albel
Hi Michael,
Thanks for the quick reply.
I tried assigning a variable in the 'Define Interactive Characteristics' dialog in the User Interface Editor. The project compiled and built ok, but at runtime in Debug mode the Display Dialog statement failed in a major way with an 'Invalid Property Value' message. At that point the IA9 IDE was dead - stuck in Debug mode.
I also tried assigning the variable in the script like this:
Set Variable Memo1.Lines to $TextVariable$
This was one statement before the Display Dialog statement. This script compiled and built ok, but at runtime in Debug mode the dialog displayed with an empty Memo1 control - no text appeared from the $TextVariable$.
I don't understand how to use the Lines property in the Memo control compared to the Caption property that every other control seems to have, and I understand pretty well. Do you have more detail on where and how to associate a script variable to the Memo.Lines property?
Thanks,
albel
Posted: Mon Jul 06, 2009 10:14 am
by MichaelNesmith
You set the Caption field in the Object Properties window. Similarly, you set the Lines field in the Object Properties window. The other approaches you took are not in the right place.
Re. Display variable lines of text on an installer dialog.
Posted: Mon Jul 06, 2009 3:58 pm
by albel
Hi Michael,
Ok, I got it to work.
The pop-up String List Editor faked me out a little. I originally interpreted it as a way to get only static text into the control. Putting the $VARIABLE$ in there worked great.
Thanks again.
albel
Posted: Mon Jul 20, 2009 11:41 am
by Tiago
Hi Michael.
I'm having a similar problem. I'm trying to write a parameter list inside a $LIST$ variable and then show this variable for the user in a label with the caption property defined as $LIST$ in the Start Installation dialog. I'm using successive Set Variable LIST to $LIST$$NEWLINE$ DescriptionOfParameter1 commands in order to write inside the variable the lines I want to show. But the fact is that, when executing my script, IA9 IDE gets locked when I reach the second Set Variable command, as if I could never use $LIST$ inside its own set statement. Any thoughts or workarounds?
Thanks in advance.