My Computer Forum Computer Science Forum

Go Back   My Computer Forum > Computer Science Forum > Programming

Programming Programming Languages, Interpreters, and Compilers - Assembly, Declarative, Machine, Object Oriented, Iterative


Reply
 
LinkBack Thread Tools Display Modes
August 4th, 2008, 05:29 PM   #1
 
Joined: Dec 2007
Posts: 232
Visual Studio -- text boxes

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?
CRGreathouse is offline  
 

My Computer Forum is free to register and we welcome everyone!

August 13th, 2008, 12:53 PM   #2
 
Joined: Aug 2008
Posts: 1
Re: Visual Studio -- text boxes

I would suggest posting your code at http://www.programminghelp.com and here so we can review the full code and work from their.
Carter is offline  
December 7th, 2008, 03:35 PM   #3
 
Joined: Dec 2008
Posts: 30
Re: Visual Studio -- text boxes

I am a frequent user of VIsual Basic 2005. Instead of inserting a RichTextBox, why not use a TextBox and set the MultiLine property to True? That way, the user can only type plain text.
SidT is offline  
December 9th, 2008, 01:50 AM   #4
 
Joined: Dec 2007
Posts: 232
Re: Visual Studio -- text boxes

Quote:
Originally Posted by SidT
I am a frequent user of VIsual Basic 2005. Instead of inserting a RichTextBox, why not use a TextBox and set the MultiLine property to True? That way, the user can only type plain text.
It doesn't allow functions like Select All, for one. But that may be best regardless.
CRGreathouse is offline  
Reply

  My Computer Forum > Computer Science Forum > Programming

Tags
boxes, studio, text, visual



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving files/adding text to files (VB/*.bat) Doug4347 Computer Science 0 December 17th, 2012 11:04 AM
Visual Basic 6 Question KingATG Programming 2 December 9th, 2011 02:43 AM
Visual Basic InvalidOperationException SidT Programming 1 July 19th, 2009 10:48 PM
Reading formatted text in C# milin Programming 4 December 15th, 2008 06:03 AM





Copyright © 2018 My Computer Forum Forum. All rights reserved.