JTrax
Posts: 12
Joined: Wed May 04, 2016 7:13 pm

add a carriage return to text

I have a checkbox on a form and the Display text is lengthy, I would like to add a carriage return into it so it looks better on the user's experience.

for example, it says...

"Run SQL Scripts Manually. WARNING: Failure to ensure your databases are up to date and correct in format can have negative impact on [ProductName]'s performance! You should be able to find the scripts in this folder: [dbScripts_Dir]" in the 3 dots (elipses)

however, the [dbScripts_Dir] value can be a lengthy folder path, so how do I get a carriage return in there say right before the [dbScripts_Dir]?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: add a carriage return to text

Hi,

To add a carriage return to your text you can try the following steps:
- create a property which will be used to add a new line to the text (i.e. [NEWLINE])
- go in the "Custom Actions" page and create an "Execute Script Inline" custom action after the "Wizard Dialogs Stage -> Searches" action group with the following code:

Code: Select all

Session.Property("NEWLINE") = vbCrLf
- use the "[NEWLINE]" property in your text where you want to add a carriage return

Another option is to remove the text of the checkbox and use a "Static Text" control next to the checkbox to display the text that you need.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
JTrax
Posts: 12
Joined: Wed May 04, 2016 7:13 pm

Re: add a carriage return to text

Perfect! thanks!
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: add a carriage return to text

You're welcome. Glad to help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”