PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

This content has been translated automatically. Click here to view the French version.
  • Definition
  • Limit: Selection in reverse video
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures

Definition

The mouse cursor is used to easily view the location where the action will be performed. For a control in edit, the cursor turns into a blinking vertical line, allowing you to easily identify the location of the next character typed.
If a selection is performed in the control, the selected characters are displayed in "reverse video". The position of the cursor corresponds to the beginning of the area displayed in "reverse video".
Some examples:
Image with input cursor placed at the beginning of the area
The input cursor is placed at the beginning of the input area. Its position is 1.
Image with input cursor placed at the end of the area
The input cursor is placed at the end of the input area. Its position is 7 in this example.
Image with input cursor placed at the beginning of the area in reverse video
The input cursor is placed at the beginning of the area in "reverse video" (position 3 in this example). The Property FinCurseur allows you to know and modify the end of the selected zone.
CursorEnd is used to find out and modify the end position of selection of the mouse cursor in one of the following controls:
  • Edit control.
  • Editable Combo Box.
  • "Edit control" column and "Editable Combo Box" column in a Table control.
Remark: To find out the text selected in an edit control, an editable Combo Box or a column in a Table control, you can use SelectedText.
Versions 15 and later
Android This property is now available for Android applications.
New in version 15
Android This property is now available for Android applications.
Android This property is now available for Android applications.
Versions 18 and later
Universal Windows 10 App This property is now available in Windows Store Apps mode.
New in version 18
Universal Windows 10 App This property is now available in Windows Store Apps mode.
Universal Windows 10 App This property is now available in Windows Store Apps mode.
Versions 20 and later
Android This Property is now available for Android applications on table columns.
New in version 20
Android This Property is now available for Android applications on table columns.
Android This Property is now available for Android applications on table columns.
Tip: To select a text section in an edit control from a button:
  1. The option "Automatic erase" must not be enabled in the edit control (unless the entire content of the control must be deleted).
  2. The button must be an "Interrupt" button and contain the following code, for example.
Versions 21 and later
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Example
// -- Click code of BTN_Selection button (Interrupt button)
// Select the entire text
SAI_Saisie1.cursor = 1
SAI_Saisie1.FinCurseur = Length(SAI_Saisie1) + 1
// Deselect the text
SAI_Saisie1.FinCursor = SAI_Saisie1.Cursor
// Place cursor at the end of the text
SAI_Saisie1.FinCurseur = Length(SAI_Saisie1) + 1
EDT_Entry1.Cursor = EDT_Entry1.EndCursor
Syntax

Finding out the position of the last selected character Hide the details

<Position> = <Control used>.CursorEnd
<Position>: Integer
Position of last selected character + 1. If no character is selected, the properties Cursor and CursorEnd are equivalent.. If the control is not in edit, the position is 0.
<Control used>: Control name
Name of the control in which a selection was performed.

Selecting a set of characters Hide the details

<Control used>.CursorEnd = <Number of selected characters>
<Control used>: Control name
Name of the control in which a selection must be performed.
<Number of selected characters>: Integer
The selected string is between the cursor position and the value transmitted to the Property CursorEnd.
The smallest possible value is 1 (cursor on the left). The greatest value corresponds to the number of characters found in the control + 1.
Caution: If the Property CursorEnd is assigned with its own content, the text is de-selected.: no character is displayed in reverse video.
Remarks

Limit: Selection in reverse video

The selection in reverse video is available only if the control is being edited. If the field is not being entered, the Property CursorEnd returns 0.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment