[SOLVED] MessageBox and AlertBox don't honour Environment.NewLine

Answered Closed
0
0

Must use “</br>” instead of Environment.NewLine

  • You must to post comments
Best Answer
0
0

That’s by design. If there is html in the text, Wisej will not convert CRLF to <br/> since it assumes that the text is html and the developer wants to decide the formatting of the text. If there is no html in the text then CRLF are converted to <br/>.

Otherwise you’d be forced to put html in one single line and have no control over the line breaks.

  • You must to post comments
0
0

Agree. Please do not forget to document it as this behaviour could make someone loose a few hours.

  • Luca (ITG)
    Absolutely! Sorry about not mentioning this sooner.
  • You must to post comments
0
0

If you don’t use </br> it works all right. Now try

var testMessage = “Line 1 NL” + Environment.NewLine + “Line 2 BR</br>” + “Line 3”;
MessageBox.Show(testMessage);
AlertBox.Show(testMessage);

and you’ll see Line 1 and Line 2 on the same line.

  • You must to post comments
0
0

Hi Tiago,

this is logged as WJ-7250 and already fixed in the latest build.
Can you please retry ?

Best regards
Frank Boettcher

  • You must to post comments
Showing 4 results