Landon Parks

I have a question... I am writing a HTML Editor and I was wondering if someone could tell me the
code that I would enter in a button's event handler to be able to make that button "Paste" a certain
code into "richTextbox1" I pretty much am looking for the button named "Form Open" to actually add the
"<FORM>" tag in the Rich Text Box.

I also got another question. Its similare to the above, only instead of involving a button, it involves
a "Tree View". I want to be able to click down in a "Tree View" and find a certain tag like "<HTML>", and
uppon double clicking on that "Tree View" button named "<HTML>" it will paste the "<HTML>" tag into "richtextBox1".

Does anyone know the answer

Thanks much!

Landon




Re: Visual C# General Code to have a button "Paste" text into a Rich Text Box...

Figo Fei - MSFT

Hi,

Copy and paste stuff can be done with the ClipBoard.

Here is the reference and examples: http://msdn2.microsoft.com/en-us/library/system.windows.forms.clipboard.aspx

http://www.codeproject.com/csharp/clipboard01.asp

Hope it helps. Thanks.






Re: Visual C# General Code to have a button "Paste" text into a Rich Text Box...

nahguam

Clipboard Eh Did you even read the question

Have you looked at the standard string methods string.Insert If you are using a RichTextBox over a standard TextBox because you are formatting then you may want to look into the rtf format. http://www.biblioscape.com/rtf15_spec.htm