Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

C# Rich Text Box appends string

Posted on 2007-03-29
2
201 Views
Last Modified: 2013-12-17
I apologize if this question has already been answered elsewhere.  I'm having a very difficult time navigating the new site and finding the answers I need in specific subject areas.  That said...

I have a RichTextForm in C# which populates the .rtf property with a literal string.  However, if the form is closed and then reopened, it hangs on to the previous string displayed and adds the string again.  

I'm trying to figure out how to destroy the form and start over each time Print is clicked.  The form is launched from an OnPrint event on a menu bar.

Thanks for any help provided!
0
Comment
Question by:NaughtyZute
2 Comments
 
LVL 29

Accepted Solution

by:
Gautham Janardhan earned 500 total points
ID: 18822775
can u post the code
0
 

Author Comment

by:NaughtyZute
ID: 18824284
My bad.  I never initialized the string to empty at the start of the concatenation.  Well, actually I did, but like a dummy, I put it as formattedString += "the text";... So it never initialized to blank.

Thanks for the reply.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

856 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