PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Events managed by default
  • Events managed by WINDEV and WINDEV Mobile
  • Events managed by WEBDEV
  • Special case: Collapsing/Expanding a node
  • Optional events
  • Filtering records (browsing TreeView control only)
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
Events associated with TreeView controls
Events managed by default
WINDEVWindows MobileJava

Events managed by WINDEV and WINDEV Mobile

WINDEV and WINDEV Mobile manage the following events by default (order of appearance in the code editor):
EventRuntime condition
InitializationRun when opening the window. Used to initialize the content of the TreeView control for example. (*)
Versions 16 and later
End of initialization
New in version 16
End of initialization
End of initialization
Code only found for the browsing TreeView controls automatically filled:
Run once the TreeView control was filled. This code is used to expand or collapse an element.
EntryRun when the mouse cursor is positioned on the TreeView control.
ExitRun when the control is no longer selected.
ClickRun when the user clicks an element of the TreeView control.
Caution: When a double click is performed on an element, the click code and the double-click code are run successively.
Versions 16 and later
Enter a row in input
New in version 16
Enter a row in input
Enter a row in input
Run when the user selects a row to perform an input in this row.
Caution: This code is available only if the input is allowed by the TreeView control.
Versions 16 and later
Row exit
New in version 16
Row exit
Row exit
Run when moving from one row or control to another (TAB key, selecting another control with the mouse, etc.).
Caution: This code is available only if the input is allowed by the TreeView control.
Versions 16 and later
Row display
New in version 16
Row display
Row display
Run when a new row must be displayed in the TreeView control.
Selecting a rowRun when a new element is selected in the TreeView control.
Right clickRun when the user performs a right click on the TreeView control (or on one of its elements).
Double clickRun when the user performs a double click on the TreeView control (or on one of its elements).
Collapsing/Expanding a nodeRun when a branch of the TreeView control is expanded or collapsed via a click or a double click performed by the user or via the + or - icons.

Caution: When a click or double-click occurs, this event is executed with the "Click" event. This event is run before the desired action is performed.

Remark: This event can accept parameters (see below).
Versions 16 and later
Filtering records
(optional event)
New in version 16
Filtering records
(optional event)
Filtering records
(optional event)
Event taken into account for browsing TreeView controls only
Run just before displaying a row. This event filters the records displayed in the TreeView control. This event is detailed at the end of this page.

(*) By default, the event "Initializing" of each control is run according to the order in which the controls were created in the window. To modify this runtime order:
  1. On the "Window" pane, in the "Order" group, click "Initialization".
  2. In the window that is displayed, use the arrows on the right to modify the initialization order of controls.
WEBDEV - Server codeWEBDEV - Browser codeAjax

Events managed by WEBDEV

WEBDEV manages the following events by default (order of appearance in the code editor):
EventRuntime condition
InitializationRun when opening the window. Used to initialize the content of the TreeView control for example.
Click (browser)Run on the computer of the Web user when the user clicks an element of the TreeView control.
Click (server)Run on the server when the user clicks an element of the TreeView control.
Special case: Collapsing/Expanding a node
WINDEVWindows MobileJava The event"Collapsing/Expanding a node" is run when the user collapses or expands a branch of the TreeView control with a click or double click.
Caution: This event must not delete the current node.
This event can accept parameters.
To manage these parameters, a procedure must be declared directly in the event "Collapsing/Expanding a node".
The procedure must be declared with the following syntax:
PROCEDURE <Procedure name>([<Element path> [, <Collapsed> [, <Identifier> ]]])
Where
<Element path>Text variable, containing the full path of the element currently collapsed or expanded. All you have to do is specify the name of a variable, this variable will be automatically initialized at run time.
<Collapsed>Boolean variable, used to find out the action performed by the user (collapse = True, expand = False). All you have to do is specify the name of a variable, this variable will be automatically initialized at run time.
Versions 15 and later
<Identifier>
New in version 15
<Identifier>
<Identifier>
Versions 15 and later
Text variable, containing the identifier of the element currently collapsed or expanded. All you have to do is specify the name of a variable, this variable will be automatically initialized at run time. The identifier was supplied during the call to TreeAdd.
New in version 15
Text variable, containing the identifier of the element currently collapsed or expanded. All you have to do is specify the name of a variable, this variable will be automatically initialized at run time. The identifier was supplied during the call to TreeAdd.
Text variable, containing the identifier of the element currently collapsed or expanded. All you have to do is specify the name of a variable, this variable will be automatically initialized at run time. The identifier was supplied during the call to TreeAdd.
Versions 16 and later
Java A procedure can be declared in the event "Collapsing/Expanding a node"
New in version 16
Java A procedure can be declared in the event "Collapsing/Expanding a node"
Java A procedure can be declared in the event "Collapsing/Expanding a node"
Example:
Optional events
WINDEVWindows MobileJava To add an optional event:
  1. Select the requested 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, for example:
  • the control rollover with the mouse,
  • the left mouse button down, up, with a double click,
  • the right mouse button down, up, with double click,
  • the mouse wheel.
Filtering records (browsing TreeView control only)
Versions 16 and later
WINDEVWindows Mobile The event "Filtering the records" is run right after a row of the TreeView control is displayed. Therefore, it is run:
  • when initializing the TreeView control.
  • whenever displaying a new row of the TreeView control.
This event filters the records displayed in the TreeView control.
To implement a filter, the event "Filtering the records" must return a value:
  • True to specify that the record matches to the filter and that it must be displayed.
  • False to specify that the record does not match the filter and that it must not be displayed.
  • Cancel to stop reading the data source of the TreeView control (very rare case).
Example:
// -- Filter the records
// Displays the customers who placed orders exceeding 3000 Euros
IF Order.TotalIOT >= 3000 THEN
RESULT True
ELSE
RESULT False
END
In this code, the data used affects the record currently read by the TreeView control. This data comes from the date file or from the query linked to the TreeView control.
New in version 16
WINDEVWindows Mobile The event "Filtering the records" is run right after a row of the TreeView control is displayed. Therefore, it is run:
  • when initializing the TreeView control.
  • whenever displaying a new row of the TreeView control.
This event filters the records displayed in the TreeView control.
To implement a filter, the event "Filtering the records" must return a value:
  • True to specify that the record matches to the filter and that it must be displayed.
  • False to specify that the record does not match the filter and that it must not be displayed.
  • Cancel to stop reading the data source of the TreeView control (very rare case).
Example:
// -- Filter the records
// Displays the customers who placed orders exceeding 3000 Euros
IF Order.TotalIOT >= 3000 THEN
RESULT True
ELSE
RESULT False
END
In this code, the data used affects the record currently read by the TreeView control. This data comes from the date file or from the query linked to the TreeView control.
WINDEVWindows Mobile The event "Filtering the records" is run right after a row of the TreeView control is displayed. Therefore, it is run:
  • when initializing the TreeView control.
  • whenever displaying a new row of the TreeView control.
This event filters the records displayed in the TreeView control.
To implement a filter, the event "Filtering the records" must return a value:
  • True to specify that the record matches to the filter and that it must be displayed.
  • False to specify that the record does not match the filter and that it must not be displayed.
  • Cancel to stop reading the data source of the TreeView control (very rare case).
Example:
// -- Filter the records
// Displays the customers who placed orders exceeding 3000 Euros
IF Order.TotalIOT >= 3000 THEN
RESULT True
ELSE
RESULT False
END
In this code, the data used affects the record currently read by the TreeView control. This data comes from the date file or from the query linked to the TreeView control.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment