Desktop Text Area
From Xojo Documentation
The Text Area control is a multi-line text field, such as a text editor or word processor. In contrast to a Text Field, it can contain multiple lines and styled text. A Text Area field with the Styled property set can display text in multiple fonts, styles, and sizes and have both horizontal and vertical scrollbars. Individual paragraphs can be left, centered, or right aligned via the StyledText class.
The Text Area supports the Edit menu’s Cut, Copy, and Paste menu items and keyboard shortcuts automatically. This functionality is built into the default Desktop Application project. If you rename or otherwise modify the Cut, Copy, and Paste menu items, you can disable the automatic functionality.
Text Fields also have built-in support for textual drag and drop.
Refer to TextArea in Language Reference for details on all its events, properties and methods.
Below is a list of common events, properties and methods.
- Called when a key is pressed while the Text Field has focus. The key that was typed is available as a parameter.
- Called when the selected text changes. Refer to UserGuide:Text Selection.
- Called when the text was changed, either by typing or through code (by setting the Text property).
- Used to identify or set the type of style that is applied to the selected text.
- Used to specify and set selected text in the Text Area. Refer to UserGuide:Text Selection.
- Set this to True (ON) in the Inspector to allow the Text Area to contain styled text. Refer to UserGuide:Styled Text for more information.
- Enables you to access the properties and methods of the StyledText class for the text in the TextArea. Refer to UserGuide:Styled Text for more information.
- Toggles the specified styled text attribute for the selected text.
To clear the text in a TextArea set it's Text property to the empty string: