Skip to Content
author's profile photo Former Member
Former Member

C# Multiline MessageBox

\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 😔

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2008 at 06:06 PM

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

    "like...\n "

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 26, 2006 at 07:47 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 28, 2006 at 01:42 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.