## The `text' property

A character vector
For a Grid, a character vector for each cell

Valid for: Browser, Combo, Edit, RichEdit, Document, System, MsgBox, APL (child task) object
Cell property for Grid object

The `text` property contains the text displayed in an Edit box, Combo, RichEdit control, or Document window, as a character vector possibly containing embedded carriage returns. By setting this property, you can change the contents of the object under program control, but it also changes as a result of user keyboard input (you can detect that this has happened by means of the `onChange` callback).

For a MsgBox, the `text` property determines the text displayed in the dialog.

For an APL (child task) object the text property contains the text in the task's session window, if any. It is a text vector, usually with embedded carriage return (ŒR) characters. The `text` property returns the logical contents of the session window, even if the session window is not visible (however it is always an empty vector for a background task, which does not have a session window). You can also write to this property to change the text in the session window of a child task.

For the System object, the `text` property contains the text (if any) in the Clipboard. If there is no text in the Clipboard, it is an empty vector. Writing to this property places (unformatted) text in the Clipboard, ready for pasting into an APLX window or another application.

For a Browser object, the text property is read-only. It contains the text displayed in the Browser, with HTML tags stripped out. (See also the `contents` property, which contains the text including the HTML tags).

#### Grid object `text` cell property

When you read this cell property for a Grid object, it returns a character vector containing the text displayed in the cell, irrespective of the cell’s type, for each cell in the list of rows and columns specified. For multiple cells, it will therefore return a nested array of character vectors.

When you write to this cell property for a Grid object, the text displayed in the cell is set to the text you supply. To set multiple cells in one operation, provide a nested array of character vectors. The type of the cell, and the cell’s `valid` property, are not changed. If the cell is Numeric, it will remain so, and its `value` will not change.

Although `text` is a cell property for a Grid object, as a convenience you can also read (but not write to) `text` as a simple property of the Grid object. It returns the text of the currently-active cell.

Topic: APLX Help : System Classes : Properties : text

[ Previous | Next | Contents | Index ]