Quantcast RichTextBox in VisualStudio Text - Physics Forums Library

PDA

View Full Version : RichTextBox in VisualStudio


CRGreathouse
Aug3-08, 12:32 PM
I'm working in C#, but my question applies, I think, to all of the MS Visual Studio.

For many programs that I write, I want a multiline text box that supports usual multiline features (TextBox doesn't let you use Ctrl + A, for example). But I also want to restrict the contents to plain text.

Now with a RichTextBox I can continually replace the contents with the plaintext version, but then formatted text still appears on a paste, for example. I want to avoid that. What's the best way of doing that?

Ideally there would be a widget that does that natively. Otherwise, would it be better/easier to change a TextBox to multiline and program in all the missing features, or try to block the things I don't want somehow from a RichTextBox? Or is there a third possibility I've missed?