C # common features and events of RichTextBox controls

Source: Internet
Author: User


What is RTF?

TextboxIt is often used to extract short text strings from the user's location, whileRichTextBoxIt is used to display and visualize formatted text (for example, blackening, downgrading, etc ). It uses the standard format text.Rich Text Format(Rich Text Format)RTF.

RichTextBoxCommon adequacy

Canredo

You can useRedoThis attention isTrue

Canundo

ForTrueYou canRichTextBoxThe previous operation is removed. Note thatCanundoInTextboxbaseSo it can also be usedTextboxWidget

Redoactionname

PassRedoMethod of reception operation name

Detecturls

ForTrueYou can make the controlURLAnd format them (in the splitter, there is a part with a lower line)

RTF

It correspondsTextAdequacy, but includesRTFFormatted text

Selectedrtf

OptionalRTFFormat text. If you convert these texts to another applicationProgram, For exampleWordThe text retains all the formatting information.

Selectedtext

AndSelectedrtfIn the same way, you can use this annotation to retrieve or set the selected text. HoweverRTFDifferent versions may cause loss of all formatting information.

Selectionalignment

Method of selecting text, which can beCenter, leftOrRight

Selectbullet

Determines whether the selected text is formatted as the delimiter or used to insert or remove the delimiter.

Bullentindent

Indicates the pixel of the marker object.

Selectioncolor

Modify the colors of selected text

Selectionfont

Modify the fonts of selected text

Selectionlength

Sets or retrieves the length of the selected text.

Selectiontype

Information of the selected text. It can be determined that one or moreOleThe image or the selected text

Showselectionmargin

ForTrueAtRichTextBoxThe left margin of will show a margin, which will make it easier to select text

Undoactionname

Revoke the name of the withdrawal action

Selectionprotected

ForTrueSpecify some parts of the text

Note: The preceding operations are related to the selected text. If no selected text is selected, the formatting operation starts from the position where the optical mark is located and the position is the insertion point.

RichTextBoxCommon events

click

when using a ticket to initiate an event

protected

events are triggered when users modify the text of a protected object using the protected object

selectionchanged

this event is triggered when the selected text changes. If you do not want to use limit to modify the selected text for some reason, you can disable it in this event


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.