Solved

C# Rich Text Box appends string

Posted on 2007-03-29
2
198 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
Comment Utility
can u post the code
0
 

Author Comment

by:NaughtyZute
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now