shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Question: Line breaks in the text control

Is it possible to have the line breaks(like \r or \n) in the "text" contron?

For example, in "WelcomeDlg" we have a text control "Description" which displays "The [Wizard] will install [ProductName] on your computer. Click [Text_Next] to continue or Cancel to exit the [Wizard]."

Would it be possible to display "Click [Text_Next] to continue or Cancel to exit the [Wizard]." in the second line?
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Question: Line breaks in the text control

Hi Rohan,

Unfortunately we don't have predefined support for this, but there are two workarounds you can use:

1. Simply place a new control under the one you already have and share the text between them

OR

2. Follow the next steps:
- create a new property in the Install Parameters page (i.e. PROP)
- go in the "Custom Actions" page and add an "Execute inline script code" custom action above the "Wizard Dialogs Stage -> Searches" action group
- in the "Script Text" text field write the following code:

Code: Select all

"Session.Property("PROP") = vbLf
- in the "Display" text field from the "Properties" panel of your description control write the desired text like this:

Code: Select all

First line[PROP]Second line
Build and run the project.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Question: Line breaks in the text control

Thank you for the solution.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Question: Line breaks in the text control

You're welcome. Glad to help.

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

Return to “Building Installers”