textbox和richtextbox之间的区别 [英] Difference between textbox and richtextbox

查看:815
本文介绍了textbox和richtextbox之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

textbox和richtextbox之间的区别

Difference between textbox and richtextbox

推荐答案

以下是Textbox和RichTextBox之间的一些区别:

======== ==================================================



当用户需要编辑格式化文本,图像,表格或其他丰富内容时,RichTextBox是更好的选择。例如,编辑需要格式化,图像等的文档,文章或博客最好使用RichTextBox完成。



TextBox比RichTextBox需要更少的系统资源当只需要编辑纯文本(即表单中的用法)时,它是理想的。



如果你想要更多地控制文本颜色的样式,主要使用RichTextBox,类型,字体,对齐等。因此,您可以在Microsoft Word中执行任何操作,您可以使用RichTextBox。它可以用来轻松保存或显示.rtf文件。



文本框主要用于显示或获取一行输入。您可以拥有一个多行TextBox,主要用于显示或获取多个单行,并使您不必管理多个TextBox。同时保持你的UI更整洁。



一个重要的技术差异是TextBox支持DataBinding,RichTextBox没有,这使得在MVVM中使用它有点讨厌application。
Here are Some Difference Between Textbox and RichTextBox :
==========================================================

A RichTextBox is a better choice when it is necessary for the user to edit formatted text, images, tables, or other rich content. For example, editing a document, article, or blog that requires formatting, images, etc is best accomplished using a RichTextBox.

A TextBox requires less system resources then a RichTextBox and it is ideal when only plain text needs to be edited (i.e. usage in forms).

A RichTextBox mainly used if you want more control over styling the text color, type, font, alignment ect. So anything you can do in Microsoft Word, you can do with a RichTextBox. It can be used to save or display .rtf files with ease.

A Textbox is basically used to display or get one line 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.

An important technical difference is that TextBox supports DataBinding, RichTextBox does not, which makes it a bit nasty to use in an MVVM application.


文本框显示纯ASCII或Unicode文本。



富文本框显示富文本格式文本 - 其中允许字处理器支持的许多格式化可能性 - 不同的字体,表格等。如果它可以被不透明地处理,但是你很少想要对Rich Text进行文本操作,因为它很可怕。



另一方面,许多工具(如程序员编辑器)使用RichTextBox,因为它允许开发人员支持语法着色等选项。
The text box displays plain ASCII or Unicode text.

The Rich Text Box displays Rich Text Format text - which allows many of the formatting possibilities supported by word processors - different typefaces, tables, etc. This is useful if it can be treated opaquely, but you rarely want to be doing textual manipulation of Rich Text, as its horrible.

On the other hand, many tools such as programmers editors use the RichTextBox, as it allows the developer to support options like syntax colouring.


A简单的TextBox可以显示没有或更少格式的文本

另一方面,RichTextBox可以帮助我们以不同的方式格式化不同的文本部分

更多de尾巴去那里 - [富文本之间的区别是什么框和普通文本框] [ ^ ]
A simple TextBox can display text without or less formatting
On the other hand, RichTextBox facilitatets us to format different parts of text differently
for more details go there-[What's the difference between Rich Text Boxes and Normal Text Boxes][^]


这篇关于textbox和richtextbox之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆