ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Edit control
  • Default events
  • Events supported by WINDEV and WINDEV Mobile
  • Optional events
  • "Validate with the keyboard" event
  • "Select a value in the list of input suggestions" event
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Default events
Universal Windows 10 AppAndroidiPhone/iPad

Events supported by WINDEV and WINDEV Mobile

WINDEV and WINDEV Mobile handle the following events by default (order of appearance in the code editor):
EventRuntime condition
InitializingExecuted when the window is opened. *
EntryExecuted when the input cursor enters the control.
ExitExecuted when moving from one control to another (TAB key, selecting another control with the mouse, etc.).
Add a tokenThis event is only available for "Text token" Edit controls.
Executed each time the user adds a token in the control. The token is added when a character specified as a token separator is used.
This event receives a variable of type Token as parameter, which allows handling the token that has been added.
If this event returns:
  • True, the token is added in the Edit control,
  • False, the token is not added. The input area of the control is cleared.
This event is not executed if the addition is done programmatically.
Universal Windows 10 App This event is not available.
Delete a tokenThis event is only available for "Text token" Edit controls.
Executed when the user deletes a token by clicking the "X" icon.
This event receives a variable of type Token as parameter, which allows handling the deleted token.
If this event returns:
  • True, the token is deleted from the Edit control,
  • False, the token is not deleted from the Edit control.
This event is not executed if an element is deleted programmatically.
Universal Windows 10 App This event is not available.
Click tokenThis event is only available for "Text token" Edit controls.
Executed when a token in an Edit control is clicked.
This event receives a variable of type Token as parameter, which allows handling the token that has been clicked on.
Universal Windows 10 App This event is not available.
Whenever modifiedExecuted whenever the content of the control is modified (entering or deleting a character, for example).

(*) By default, the "Initialization" event of each control is executed according to the order in which the controls were created in the window. To change this order of execution:
  1. On the "Window" tab, in the "Order" group, click "Initialization".
  2. In the window that appears, use the arrows on the right to change the order in which the controls are initialized.
Optional events
Several optional events are supported. To add an optional event:
  1. Select the desired control.
  2. Display the code window of this control (F2 key).
  3. Click the link "Add other events to xxx" at the bottom of the window code, after the last event.
  4. All the optional events available for the control are displayed.
  5. Check the optional event to add and validate.
    Remark: You can select several optional events.
  6. The selected optional event is automatically added to the events managed by the control.
To disable an optional event, simply perform the same operations to display the list of optional events. Then simply uncheck the optional events to delete.
Remark: If the disabled code contains WLanguage code, this code is automatically deleted.
You can manage the following aspects, for example:
  • the mouse hover over the control,
  • left mouse button down, up, double click,
  • right mouse button down, up, double click,
  • the mouse wheel, etc.
AndroidiPhone/iPad

"Validate with the keyboard" event

The optional "Validate with the keyboard" event will be executed when the button at the bottom right of the alphabetical keyboard is used.
To configure this button:
  1. Go to the "Details" tab of the Edit control description window.
  2. Go to "Keyboard button" and select the desired type of button. Depending on the selected type, the system will display the corresponding button in the current language on the device.

  3. Validate.
  4. Open the code of the Edit control.
  5. If necessary, add the "Validate with the keyboard" optional event and write the code of the desired action.

"Select a value in the list of input suggestions" event

The optional "Select a value in the list of input suggestions" event is executed when the user selects an element from the list of input suggestions. To handle this event more easily, it is associated with a procedure:
PROCÉDURE InputSuggestionSelection(MySelection is AssistedInput)
The variable of type AssistedInput contains the characteristics of the element selected in the input suggestions (text displayed and corresponding stored value).
For example, this event allows you to:
  • get the selected option.
  • change the value displayed in the Edit control after the selection is made.
// Add a suggestion
_AutocompleteSuggestion is AssistedInput
_AutocompleteSuggestion.Caption = "Alpharetta, GA 30022"
_AutocompleteSuggestion.StoredValue = 30022
AssistedInputAdd(EDT_PostalCode, _AutocompleteSuggestion)

// -- Event "Select a value in the list of input suggestions"
PROCÉDURE Selection(MySelection is AssistedInput)
EDT_PostalCode = MySelection.StoredValue
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/07/2023

Send a report | Local help