Both the TMemo and TRichEdit controls handle multiple lines of text.
TMemo is another type of edit box that handles multiple lines of text. The lines in a memo control can extend beyond the right boundary of the edit box, or they can wrap onto the next line. You control whether the lines wrap using the WordWrap property.
TRichEdit is a memo control that supports rich text formatting, printing, searching, and drag-and-drop of text. It allows you to specify font properties, alignment, tabs, indentation, and numbering.
Note: The rich edit control is available for VCL applications only.
In addition to the properties that all edit controls
have, memo and rich edit controls include other properties, such as the following:
- Alignment specifies how text is aligned (left, right, or center) in the component.
- The Text property contains the text in the control. Your application can tell if the text changes by checking the Modified property.
- Lines contains the text as a list of strings.
- OEMConvert determines whether the text is temporarily converted from ANSI to OEM as it is entered. This is useful for validating file names (VCL only).
- WordWrap determines whether the text will wrap at the right margin.
- WantReturns determines whether the user can insert hard returns in the text.
- WantTabs determines whether the user can insert tabs in the text.
- AutoSelect determines whether the text is automatically selected (highlighted) when the control becomes active.
At runtime, you can select all the text in the memo with the SelectAll
Note: Under Windows 9x both Memo and Rich Edit controls are limited to storing 64 kb of data.