Displaying and Editing Text in a Rich Edit Memo Control

From RAD Studio
Jump to: navigation, search

Go Up to Displaying a Single Record


TDBRichEdit is a data-aware component - similar to the standard TRichEdit component - that can display formatted text stored in a binary large object (BLOB) field. TDBRichEdit displays formatted, multi-line text, and permits a user to enter formatted multi-line text as well.

Note: While TDBRichEdit provides properties and methods to enter and work with rich text, it does not provide any user interface components to make these formatting options available to the user. Your application must implement the user interface to surface rich text capabilities.

By default, TDBRichEdit permits a user to edit memo text. To prevent editing, set the ReadOnly property of the rich edit control to True. To display tabs and permit users to enter them in a memo, set the WantTabs property to True. To limit the number of characters users can enter into the database memo, use the MaxLength property. The default value for MaxLength is 0, meaning that there is no character limit other than that imposed by the operating system.

Because the TDBRichEdit can display large amounts of data, it can take time to populate the display at run time. To reduce the time it takes to scroll through data records, TDBRichEdit has an AutoDisplay property that controls whether the accessed data should be displayed automatically. If you set AutoDisplay to False, TDBRichEdit displays the field name rather than actual data. Double-click inside the control to view the actual data.

See Also