|
|
|
|
- Definition
- Special case: RTF control
- Limit: Modifying the position of the input cursor
Cursor (Property) In french: Curseur
Definition The mouse cursor allows you to easily determine where an action will be performed. For a control in edit mode, the cursor turns into a blinking vertical line, allowing you to identify the location of the next character typed.
Selected characters are highlighted. The cursor position is set at the beginning of the highlighted section. For example: | The input cursor is placed at the beginning of the input area. Its position is 1. | | The input cursor is placed at the end of the input area. Its position is 7 in this example. | | The input cursor is placed at the beginning of the highlighted section (position 3 in this example). The CursorEnd property is used to get and change the end of the selected area. | | |
The Cursor property is used to get and change the position of the mouse cursor in one of the following controls: - Edit control.
- Editable Combo Box control.
- "Edit control" column and "Editable Combo Box" column in a Table control.
Word Processing control. HTML Editor control.
Remark: To get the text selected in an edit control, an editable Combo Box or a column in a Table control, you can use SelectedText.
Tip: To select a text section in an edit control from a Button control: - The option "Automatic erase" must not be enabled in the edit control (unless the entire content of the control must be deleted).
- The button must be an "Interrupt" button and contain, for example, the following code:
// -- Click of BTN_Selection (Interrupt button) // Select the entire text EDT_Edit1.Cursor = 1 EDT_Edit1.CursorEnd = Length(EDT_Edit1) + 1 ScreenFirst(EDT_Edit1)
// Insert a character string at cursor position EDT_ControlName = Left(EDT_ControlName, EDT_ControlName.Cursor) + ... " is called " + Right(EDT_ControlName, EDT_ControlName.Cursor)
Syntax
Finding out the position of the input cursor Hide the details
<Current value> = <Control used>.Cursor
<Current value>: Integer Current position of the input cursor in the control. This position can vary between:- 0 (the control is not in edit and there is no input cursor).
- The number of characters displayed in the control + 1 (the input cursor is located at the end of the input area).
<Control used>: Control name Name of the control in which the input cursor is displayed: - Edit control.
- Editable Combo Box control.
- "Edit control" column and "Editable Combo Box" column in a Table control.
Word Processing control. HTML Editor control.
Modifying the position of the input cursor Hide the details
<Control used>.Cursor = <New value>
<Control used>: Control name Name of the control where the position of the input cursor must be modified: - Edit control.
- Editable Combo Box control.
- "Edit control" column and "Editable Combo Box" column in a Table control.
Word Processing control. HTML Editor control.
<New value>: Integer New position of the input cursor, between 1 and the number of characters currently displayed in the control + 1. Remarks Limit: Modifying the position of the input cursor The position of the input cursor can be modified only if the control is currently in edit. If the control is not in edit mode, the Cursor property returns 0.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|