Home All Groups Group Topic Archive Search About

What is pasted into a RichTextBox?

Author
11 Aug 2006 6:50 PM
Dave Wurtz
All,

Can someone tell me what DataFormat from the clipboard is used when
pasting into a RichTextBox control by using Ctrl-V?

If I copy unicode text from a HTML document and paste into a
RichTextBox control, it pastes little squares even though the RTB's
font is set to "Arial Unicode MS".  If I copy the unicode text from the
HTML, paste it into MS-Word, copy the MS-Word text, and paste it into
the RTB control it works fine.  The clipboard's GetFormats() does
return different formats when copying from HTML vs MS-Word, but which
one does the RTB use?

Also, is there someway to get in front the paste routine?  I don't see
a 'BeforePaste' event or an overridable OnPaste method.  Is there a
different way?

Thanks for your help in advance!

Dave Wurtz

Author
11 Aug 2006 7:18 PM
Alan Pretre
"Dave Wurtz" <dave_wu***@asdsoftware.com> wrote in message
news:1155322256.257758.47200@i3g2000cwc.googlegroups.com...
> Can someone tell me what DataFormat from the clipboard is used when
> pasting into a RichTextBox control by using Ctrl-V?

Dave,

I don't know the specific answer to your question.  Thought I would mention
though that there is a handy little utility for working with the RTB control
that I have found useful, may it will help in your situation?

http://www.knowdotnet.com/articles/richtextexplorer.html


-- Alan