[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

C# Message Box Text

Posted on 2006-04-03
3
Medium Priority
?
498 Views
Last Modified: 2012-05-05
I'm presenting the user with a Message Box in C#, I have a lot of text to add, how do I get that text to wrap, skip a line, and indent?
0
Comment
Question by:tsmolskow
3 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 16362113
You can put line breaks in by using the "\n" escape sequence. Wrapping is automatic unless you force it by using \n. Not sure if you can indent text or not.
0
 
LVL 18

Accepted Solution

by:
Ravi Singh earned 2000 total points
ID: 16362159
Hi, use the new line and tab escape characters in your message string, e.g:

      string message = "Hello\nWorld\t!!!";
      MessageBox.Show(message);

"\n" is a new line
"\t" is a tab (use for indent)

For a list of the supported escape characters see:
http://www.peachpit.com/articles/article.asp?p=31938&seqNum=9
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 16362244
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…
Hi, this video explains a free download that you can incorporate into your Access databases, or use stand-alone for contact management. Contacts -- Names, Addresses, Phone Numbers, eMail Addresses, Websites, Lists, Projects, Notes, Attachments…

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question