Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / March 2005

Tip: Looking for answers? Try searching our database.

"\n" does not work inside a textbox control class

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kerem G?mr?kc? - 06 Mar 2005 08:08 GMT
Hi,

i am about to burst!!! how can i make my string break inside a textbox?
i mean with a control charater like "\n", but it does not work!

i have a string and i must set the wrap manuall, not controled by the
wordwrap property of the textbox. as i alread said: "\n" does not work!

Language s C#

how can i solve this.

Best Regards

Kerem G?mr?kc?
Mattias Sj?gren - 06 Mar 2005 10:49 GMT
>i am about to burst!!! how can i make my string break inside a textbox?
>i mean with a control charater like "\n", but it does not work!

\r\n is the combination to use in Windows (or
System.Environment.NewLine). You must of course also set the textbox'
MutliLine property to true.

Mattias

Signature

Mattias Sjögren [MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

gaidar - 06 Mar 2005 23:07 GMT
Are you sure that you using C# syntax correctly?
Try to do the following:

textBox1.Multiline = true;
textBox1.Text = "This is a line\r\nAnother line";

> Hi,
>
[quoted text clipped - 11 lines]
>
> Kerem G?mr?kc?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.