This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: How Can I Insert a CRLF in a String?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Nov 29, 2011
07:25 PM
How Can I Insert a CRLF in a String?
How can I insert a CRLF in a string in a Suite or Basic MSI project?
(9) Replies
Nov 30, 2011
03:40 AM
I'm not sure, but you can try "\n" (new line) and "\r" (cariage return).
Nov 30, 2011
10:15 AM
This is straight from InstallShield 2012 InstallScript Reference Guide.pdf page 11.
Inserting a Newline Character Into a String
A commonly used escape sequence is \n, which inserts a newline character into a string. The string “This is line one, This is line two.” is displayed or printed on a single line. However, the string “This is line one,\nThis is line two.” is displayed or printed as shown below:
This is line one,
This is line two.
.
.
.
\r Inserts a carriage return only. Does not insert a line feed.
Nov 30, 2011
12:18 PM
Guess I should have mentioned that I already tried \n and \r. Those may work fine in ISScript, but they do not work in the Strings table of a Suite or Basic MSI project.
Nov 30, 2011
01:03 PM
You are right, there seems to be no way to set newline in string editor for basic MSI. From other posts, it seems like earlier \n or Ctrl+Enter used to work but that's not the case anymore. Interestingly none of the built-in dialogs use a newline. They simply use a new text control if needed. You can do that or the other option is to set the text programmatically in InstallScript (which would be a lot of work for what it's worth considering you are in Basic MSI).
Nov 30, 2011
01:47 PM
Actually, I think you can go to User Interface > String Editor, select the desired string, and click Edit Selected String (or press Ctrl+Enter). In the Value field of the string entry editor, type Ctrl+Enter wherever you want the CRLF.
Nov 30, 2011
01:57 PM
Robert,
I saw your old thread on same topic and then tried that in a new sample Basic MSI project. I simply tried to edit an existing string on InstallWelcome dialog by going to layout, edit the text control, then the string in string table...
It didn't work for me.
I tried '\n', '\r\n', '\\r\\n', CRLF, Ctrl+Enter, equivalent UNICODE/ASCII code, with and without brackets, single quotes, double quotes etc.. nothing seemed to work.
I saw your old thread on same topic and then tried that in a new sample Basic MSI project. I simply tried to edit an existing string on InstallWelcome dialog by going to layout, edit the text control, then the string in string table...
It didn't work for me.
I tried '\n', '\r\n', '\\r\\n', CRLF, Ctrl+Enter, equivalent UNICODE/ASCII code, with and without brackets, single quotes, double quotes etc.. nothing seemed to work.
Nov 30, 2011
02:05 PM
Nov 30, 2011
02:33 PM
Robert,
As usual... you are correct. I guess you guys know all the details now. I ran into the same problem as skolte because I have always edited strings the way he did. Your instructions do work nicely... I might caution that is a bit less than ideal because sometimes when you go back and edit, there is no indication of the CRLF, even when you edit the string as you suggested. At least that is the case for a Suite project.
Thanks 🙂
As usual... you are correct. I guess you guys know all the details now. I ran into the same problem as skolte because I have always edited strings the way he did. Your instructions do work nicely... I might caution that is a bit less than ideal because sometimes when you go back and edit, there is no indication of the CRLF, even when you edit the string as you suggested. At least that is the case for a Suite project.
Thanks 🙂