Employers - Post Free Jobs
Forum guidelines
AuthorQuestion
Difference between Textbox and RichTextbox
Posted on: 31 Jan 2010
Hi All,

I am new to C#. What is the difference between Textbox and RichTextbox

Nithya
AuthorReply
Nila
  • 0
  • 0
Re: Difference between Textbox and RichTextbox
Posted on: 31 Jan 2010  

Hi Nithya,
 Here i give a link , Go through it, i think it will help  you.
http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/a06ab05a-fbde-47ef-89c5-a7a57f32ffd3
If it helps u plzz Mark it as Answer.

Nila
Re: Difference between Textbox and RichTextbox
Posted on: 31 Jan 2010  

There are quite a few differences..
 
Lets first talk about what they do and then you can see the difference.
TextBox:
In a nut shell, It is basically use to display or get one liner input.  You can have a multi-line TextBox which is used mainly to display or get more than one one-liner and keeps you from having to manage multiple TextBox's.   Also keeps your UI a little more tidy.
 
RichTextBox:
This is mainly used if you want a story type response or to display something of the like.  You have more control over styling the text color, type, font, alignment ect...  Basically anything you can do in Microsoft Word, you can do with a RichTextBox.  It is also used to save or display .rtf files with ease.
 
If you want a user to input their name then use a TextBox.  If you want the user to input what they did for the day, use a RichTextBox.

Re: Difference between Textbox and RichTextbox
Posted on: 02 Feb 2010  

A simple TextBox can display text without or less formatting i.e it can display all of its Text in same formatiing. Like Bold, Italic Uderline or combination. You can give it fore color and also change font. That's it!

On the other hand, RichTextBox facilitatets us to format different parts of text differently. Like 1 Area of text is bold other is normal while another is Bold + Italic+ Underline. You can alo put bullets in RichtextBox, Also set Fore and Background color of text. Also RichTextBox can display tables while Textbox can't. So there are many scenerios where you do need this type of formatting and a simple TextBox is of no use.

Exact examples of these 2 are Notepad (TextBox) and Wordpad (RichTextBox).


Employers - Post Free Jobs

SPONSORED BY

Offshore Software and Database Development
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.