TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Tony
NA
30
0
How to display a long string in a TextBox
Nov 3 2009 12:34 PM
I have a C# app that through a Reflection terminal emulator API pulls information off a screen line by line and adds each line to a string. Between each line is a \n. Later in the code the completed string was being correctly displayed in a MessageBox. This was great until one of the screens included a MORE button which means there are multiple screens of data. I can add the additional lines of data to the string but the MessageBox gets really large necessitating a scrolling capability. So, I used a TextBox with scrollbars, multiline, etc. The problem is that the data is no longer correctly formatted. It acts like TextBox does not see the newline. I have read many postings suggesting using Environment.NewLine instead of \n but it results in the same formatting unlike it was using the MessageBox.
I am relatively new to C# and am hoping someone can point in the right direction on how to handle this. Any advise will be much appreciated.
Reply
Answers (
3
)
running CommandPrompt from a Windows Service
Help me! Use Pointers in C#