TX Text Control ActiveX

Text Selections and Character Input

Topic

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

MemberDescription
TXTextControl.CurrentInputPositionReturns or sets an array of three values which specify the page, line and column number of the current text input position.
TXTextControl.FormatSelectionSpecifies whether character and paragraph formatting properties apply to the whole text or to a particular selection only.
TXTextControl.HideSelectionSpecifies whether a text selection is hidden when the TXTextControl loses the input focus.
TXTextControl.InsertionModeSpecifies whether text is inserted or overwrites existing text.
TXTextControl.SelectObjectsSpecifies a value controlling the selection of objects such as images and textframes which are inserted behind the text.
TXTextControl.SelLengthReturns or sets the number of characters selected.
TXTextControl.SelStartReturns or sets the starting point of text selected or indicates the position of the insertion point if no text is selected.
TXTextControl.SelTextReturns or sets the string containing the currently selected text.

Methods

MemberDescription
TXTextControl.GetCaretRectReturns the rectangular area covered by the caret which indicates the current text input position.
TXTextControl.InputPosFromPointReturns the text input position belonging to a certain geometric position.

Events

MemberDescription
TXTextControl.ClickOccurs when the user presses and then releases a mouse button over a TXTextControl.
TXTextControl.DblClickOccurs when the user presses and releases a mouse button and then presses and releases it again over a TXTextControl.
TXTextControl.KeyDownOccurs when the user presses a key while the TXTextControl has the input focus.
TXTextControl.KeyPressOccurs when the user presses and releases an ANSI key while the TXTextControl has the input focus.
TXTextControl.KeyStateChangeOccurs when the character insertion mode or when the state of the NUMLOCK or CAPSLOCK key has been changed.
TXTextControl.KeyUpOccurs when the user releases a key while the TXTextControl has the input focus.
TXTextControl.MouseDownOccurs when the user presses a mouse button.
TXTextControl.MouseMoveOccurs when the user moves the mouse.
TXTextControl.MouseUpOccurs when the user releases a mouse button.
TXTextControl.PosChangeOccurs when the current character input position has been changed.