Populate an Edit Box from a variable

Got a problem you cannot solve? Try here.
Post Reply
Guest

Populate an Edit Box from a variable

Post by Guest »

I have a custom dialog that lets the user set some variables that get written to an ini file for startup.

Sometimes it is necessary to do a maintenance install (add/remove components). If the user had originally installed this component, and leaves it installed, I want that custom dialog to be populated with the values from the ini file. I can read the values from the ini just fine.

How can I get the edit box to be populated with the variable's value?
jimo
Posts: 342
Joined: Fri Aug 19, 2005 10:59 am
Location: Atlanta, GA
Contact:

Post by jimo »

Try using a standard label with a variable say $INIVALUES$ for the caption property then when reading in the values assign them to the INIVALUES variable like
Set Variable INIVALUES to $INIVALUES$$NEWLINE$$VALUE1FROMINI$
etc, etc.
Jim Oswell
Software Engineering Manager, Dental
Greenway Health, LLC
http://greenwaymedical.com
Guest

Post by Guest »

I would still like to let them change it, however. The main value they set is for an IP address. If they are changing components then they are likely to be changing what server they want to talk to.

From your response it appears that the best I can do is display the old value and let them enter a new one if they would like. I can think how to make that work but for one other problem: Is there a way to change the visibility of a dialog component based on a variable?
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Yes - just put a label on the form and set its caption to $VAR$, this way you can easily use that label's caption property in the rules editor.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Post Reply