c# - RichTextBox delete old output, and set new output when clicking a button -


in c# project have read-only richtextbox, textbox input , button. when user types text, output written in richtextbox when push button.

but if type more text, old text still in richtextbox , new text appended.

how can delete old output clicking button , @ once indicate new output?

thank indeed!

-valeria-

string newstring =txtinput.text; richtextbox.text+=newstring; 

Comments

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -

collision detection - C++ library for mesh to mesh intersection: what is available? -