Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

RichTextBox in VisualStudio

  1. Aug 3, 2008 #1

    CRGreathouse

    User Avatar
    Science Advisor
    Homework Helper

    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?
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you help with the solution or looking for help too?
Draft saved Draft deleted