?
Solved

C# Rich Text Box appends string

Posted on 2007-03-29
2
Medium Priority
?
206 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 2000 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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
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…

752 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