Delphi Programming Tutorial – Unit 6.10: Exploring RichEdits (TRichEdit Class):
We will learn about RichEdits (the TRichEdit class) in this video. We use a TRichEdit object to place a standard Windows rich text edit control on a Form. Rich text edit controls let the user enter, edit, format, print, and save text that includes variation in font and paragraph formatting.
TRichEdit has properties and methods to enter and work with rich text. TRichEdit does not provide any user interface components to make these formatting options available to the user. Programmers must implement the user interface components in their applications to surface the rich text capabilities of a TRichEdit object. To make this easier, a number of pre-defined standard actions operate on a rich edit control to perform common formatting tasks.
Rich Edit provides a simple Print method allowing you to programmatically print the (formatted) contents of the rich edit to the active printer – with a single line of code.
In this tutorial, we complete the Graphical User Interface for the Contact Information project that we worked on in previous tutorials. We add a TRichEdit on our Form and set some of its properties in the Object Inspector. We explore the various options of the TRichEdit’s ScrollBars property. After we completed the tutorial the following values must be set for the properties of our TRichEdit:
– Lines – [Empty] : Remove all the lines;
– ReadOnly – True: User is not allowed to enter or edit values;
– Height – 200
– Left – 30
– Top – 290
– Width – 475
This Delphi programming tutorial is best viewed in HD. To change your settings to HD:
1. Click on the Gear-icon (Settings) at the bottom of the YouTube Video Player.
2. Select “720p HD” and wait a few moments for the setting to take effect.
For more Delphi video tutorials also join us at https://www.learndelphi.net.
You may also want to visit the following resources for more information: