TMemo
Description
Provides a multiline edit control.
Remarks
Use TMemo to put a standard Windows multiline edit control on a form. Multiline edit boxes allow the user to enter more than one line of text. They are appropriate for representing lengthy information.
TMemo Properties
Property Lines: TStringList (R)
Contains the individual lines of text in the memo control. Use Lines to manipulate text in an memo control on a line-by-line basis. Lines is a TStringList object, so the TStringList methods may be used for Lines to perform manipulations such as counting the lines of text, adding new lines, deleting lines, or replacing lines with new text.
To work with all the text at once, use the Text property. To manipulate individual lines of text, the Lines property works better.
Property ScrollBars: Enumeration (ssNone, ssHorizontal, ssVertical, ssBoth) (R/W)
Use ScrollBars to give a multiline edit control horizontal or vertical scroll bars. ScrollBars can take one of the following values:
Property WantReturns: Boolan (R/W)
Determines whether the user can insert return characters into the text. Set WantReturns to true to allow users to enter return characters into the text. Set WantReturns to false to allow the form to handle return characters instead. For example, in a form with a default button (such as an OK button) and a memo control, if WantReturns is false, pressing Enter chooses the default button. If WantReturns is true, pressing Enter inserts a return character in the text.
Note: If WantReturns is false, users can still enter return characters into the text by pressing CTRLl+ENTER.
Property WantTabs: Boolan (R/W)
Determines whether the user can insert tab characters into the text. Set WantTabs to true to allow users to enter tab characters into the text. Set WantTabs to false if you want the tab character to select the next control on the form instead.
Note: If WantTabs is true, users can tab into the edit control, but they can't tab out.
Property WordWrap: Boolan (R/W)
Determines whether the edit control inserts soft carriage returns so text wraps at the right margin. Set WordWrap to true to make the edit control wrap text at the right margin so it fits in the client area. The wrapping is cosmetic only. The text does not include any return characters that were not explicitly entered. Set WordWrap to false to have the edit control show a separate line only where return characters were explicitly entered into the text.
Note: There should be no use for a horizontal scroll bar if WordWrap is true.