cancel
Showing results for 
Search instead for 
Did you mean: 

C# Multiline MessageBox

Former Member
0 Kudos

\n doesn't work.

Is there any trick for me to add make a Message in MultiLines ?

I tried \r, \n, Environment.NewLine which is the same as \n anyway, and the message doesn't appear if I put any of these.

Mess = "This is a test...\n";

Mess += "To see if a multiline text works...";

int iReturnValue = SBO_Application.MessageBox(Mess, 2, "&Yes", "&No", "");

This doesn't show anything and go right through the line.

but just one line works

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member

Already answered in another thread. Add a space after the \n

"like...\n "

Former Member
0 Kudos

Hi,

If you are at SAP 2005 SP01 there is a problem with a newline at the end of your message text. This can be solved by putting a space at the end. Otherwise, you can you \r\n to insert a newline in your message.

David

rasmuswulff_jensen
Active Contributor
0 Kudos

This work for me (SBO2005A SP01):

sboApplication.MessageBox("Test" + Environment.NewLine + "Test2",1,"Yes","No","");

Also tried your test code... works too.. What SBO-version do you use?

Result: http://www.rwj.dk/sdn/multiline.jpg

<i>Kind Regards

Rasmus Wulff Jensen | http://www.b1up.net</i>;