Text Selections and Character Input
The selection and the input position decide where TXTextControl inserts and formats text. The members below read and set the selected text, its start and length, the insertion mode and the caret position.
The events report mouse clicks, key strokes and changes of the input position, which is how an application reacts to the user's character input.
Properties
| Member | Description |
|---|---|
TXTextControl.CurrentInputPosition | Returns or sets an array of three values which specify the page, line and column number of the current text input position. |
TXTextControl.FormatSelection | Specifies whether character and paragraph formatting properties apply to the whole text or to a particular selection only. |
TXTextControl.HideSelection | Specifies whether a text selection is hidden when the TXTextControl loses the input focus. |
TXTextControl.InsertionMode | Specifies whether text is inserted or overwrites existing text. |
TXTextControl.SelectObjects | Specifies a value controlling the selection of objects such as images and textframes which are inserted behind the text. |
TXTextControl.SelLength | Returns or sets the number of characters selected. |
TXTextControl.SelStart | Returns or sets the starting point of text selected or indicates the position of the insertion point if no text is selected. |
TXTextControl.SelText | Returns or sets the string containing the currently selected text. |
Methods
| Member | Description |
|---|---|
TXTextControl.GetCaretRect | Returns the rectangular area covered by the caret which indicates the current text input position. |
TXTextControl.InputPosFromPoint | Returns the text input position belonging to a certain geometric position. |
Events
| Member | Description |
|---|---|
TXTextControl.Click | Occurs when the user presses and then releases a mouse button over a TXTextControl. |
TXTextControl.DblClick | Occurs when the user presses and releases a mouse button and then presses and releases it again over a TXTextControl. |
TXTextControl.KeyDown | Occurs when the user presses a key while the TXTextControl has the input focus. |
TXTextControl.KeyPress | Occurs when the user presses and releases an ANSI key while the TXTextControl has the input focus. |
TXTextControl.KeyStateChange | Occurs when the character insertion mode or when the state of the NUMLOCK or CAPSLOCK key has been changed. |
TXTextControl.KeyUp | Occurs when the user releases a key while the TXTextControl has the input focus. |
TXTextControl.MouseDown | Occurs when the user presses a mouse button. |
TXTextControl.MouseMove | Occurs when the user moves the mouse. |
TXTextControl.MouseUp | Occurs when the user releases a mouse button. |
TXTextControl.PosChange | Occurs when the current character input position has been changed. |