Solved

C# Rich Text Box appends string

Posted on 2007-03-29
2
203 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
[X]
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
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

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.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

733 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