PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Events managed by default
  • Optional events
  • Filtering records (browsing TreeView Table control only)
  • Before displaying the automatic tooltip of scrollbar
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
Events associated with TreeView Table controls
Events managed by default
Versions 18 and later
WEBDEV - Server codeWindowsLinux The TreeView Table control is now available for WEBDEV sites.
PHP The TreeView Table control is now available for PHP sites.
New in version 18
WEBDEV - Server codeWindowsLinux The TreeView Table control is now available for WEBDEV sites.
PHP The TreeView Table control is now available for PHP sites.
WEBDEV - Server codeWindowsLinux The TreeView Table control is now available for WEBDEV sites.
PHP The TreeView Table control is now available for PHP sites.
WINDEVAndroidiPhone/iPad WINDEV and WINDEV Mobile manage the following events by default (order of appearance in the code editor):
EventRuntime condition
InitializationRun when the window is opened. *

Special case: Browsing TreeView Table control automatically filled
When this code is run, the TreeView Table control is not populated yet. To force the control to be filled in this code, use:You can also filter records with HFilter.
End of initializationCode only for browsing TreeView Table controls populated automatically
Run once the control has been filled. This code is used to select an element in the TreeView Table control, to add or modify an element.
Entry in the TreeView Table controlRun when the control takes focus.
Exit from the TreeView Table controlRun when moving from one control to another (TAB key, selecting another control with the mouse, etc.).
Entry in input in a row of the TreeView Table controlRun when the user selects a row to perform an input in this row.
Exit from a row of the TreeView Table controlRun when moving from one row or control to another (TAB key, selecting another control with the mouse, etc.).
Displaying a row of the TreeView Table controlRun when a new row must be displayed in the TreeView Table control, for example when one of the following actions is performed: re-display the control, scroll or move in the control, ...
Selecting a row of the TreeView Table controlRun when the user selects a row (without input).
Versions 27 and later
WINDEVAndroidiPhone/iPad TreeView Table controls include the following option: "Expand by clicking the row". If this option is checked, the hierarchy can be expanded by clicking on the row (and not only on the expand icon).
AndroidiPhone/iPad Special case: "Android/iOS selection mode" option selected ("UI" tab of the control description window):
  • If the "Expand by clicking the row" option is enabled, the "Selecting a row" event is not called when the user clicks the row (if it is a node) and the value of the control does not change. The "Collapsing/Expanding" event of a node is called. In this event, the value of the control (Value property) corresponds to the row clicked.
  • If the "Expand by clicking the row" option is not enabled, the "Selecting a row" event is not called when the "+" and "_" buttons are clicked (if it is a node). The "Collapsing/Expanding" event of a node is called. In this event, the value of the control (Value property) corresponds to the row clicked...
New in version 27
WINDEVAndroidiPhone/iPad TreeView Table controls include the following option: "Expand by clicking the row". If this option is checked, the hierarchy can be expanded by clicking on the row (and not only on the expand icon).
AndroidiPhone/iPad Special case: "Android/iOS selection mode" option selected ("UI" tab of the control description window):
  • If the "Expand by clicking the row" option is enabled, the "Selecting a row" event is not called when the user clicks the row (if it is a node) and the value of the control does not change. The "Collapsing/Expanding" event of a node is called. In this event, the value of the control (Value property) corresponds to the row clicked.
  • If the "Expand by clicking the row" option is not enabled, the "Selecting a row" event is not called when the "+" and "_" buttons are clicked (if it is a node). The "Collapsing/Expanding" event of a node is called. In this event, the value of the control (Value property) corresponds to the row clicked...
WINDEVAndroidiPhone/iPad TreeView Table controls include the following option: "Expand by clicking the row". If this option is checked, the hierarchy can be expanded by clicking on the row (and not only on the expand icon).
AndroidiPhone/iPad Special case: "Android/iOS selection mode" option selected ("UI" tab of the control description window):
  • If the "Expand by clicking the row" option is enabled, the "Selecting a row" event is not called when the user clicks the row (if it is a node) and the value of the control does not change. The "Collapsing/Expanding" event of a node is called. In this event, the value of the control (Value property) corresponds to the row clicked.
  • If the "Expand by clicking the row" option is not enabled, the "Selecting a row" event is not called when the "+" and "_" buttons are clicked (if it is a node). The "Collapsing/Expanding" event of a node is called. In this event, the value of the control (Value property) corresponds to the row clicked...
Collapsing/Expanding a node of the TreeView Table controlRun when the user expands or collapses a node.
Remark: To get the name of the collapsed/expanded row in this event, use the following syntax: TreeViewTableName[TreeViewTableName].

(*) By default, the "Initializing" event of each control is run according to the order in which the controls were created in the window. To modify this order of execution:
  1. On the "Window" tab, in the "Order" group, click "Initialization".
  2. In the window displayed, use the arrows on the right to modify the order in which the controls are initialized.
Versions 18 and later
WEBDEV - Server codeWEBDEV - Browser code WEBDEV manages the following events by default (order of appearance in the code editor):
EventRuntime condition
Initialization (Server code)Run when the page is opened.
Special case: Browsing TreeView Table control populated automatically:
When this code is run, the TreeView Table control is not populated yet. To force the TreeView Table control to be filled in this code, use:
Run when the page is opened.
Special case: Browsing TreeView Table control populated automatically:
When this code is run, the TreeView Table control is not populated yet. To force the TreeView Table control to be filled in this code, use:
You can also filter records with HFilter.
End of initialization (Server code)Code only for browsing TreeView Table controls populated automatically
Run once the TreeView Table control has been populated. This code enables you to select an element in the control, or to add or modify an element.
Selecting a table row (Server code)Code run when the user selects a row in the TreeView Table control.
Row display (Server code)Run when a new row must be displayed in the TreeView Table control: the TreeView Table control is redisplayed, scrolled or moved, etc.
Used to manage the calculated columns.
Table click (Browser code)Run when the Web user selects a row.
Exit from a row (Server code)Run when moving from one row or control to another (TAB key, selecting another control with the mouse, etc.).
Row selection (Browser code)Run when the user selects a row (without input).
Filtering the records (Server code)Code only for browsing TreeView Table controls populated automatically
Run just before displaying a row. This event is used to filter the records that must be displayed in the TreeView Table control. This event is detailed at the end of this page.
Collapsing, Expanding a row (Server code)Run when the user collapses or expands a row (or branch).
Remark: to get the name of the collapsed/expanded row in this event, use the following syntax: TreeViewTableName[TreeViewTableName].
New in version 18
WEBDEV - Server codeWEBDEV - Browser code WEBDEV manages the following events by default (order of appearance in the code editor):
EventRuntime condition
Initialization (Server code)Run when the page is opened.
Special case: Browsing TreeView Table control populated automatically:
When this code is run, the TreeView Table control is not populated yet. To force the TreeView Table control to be filled in this code, use:
Run when the page is opened.
Special case: Browsing TreeView Table control populated automatically:
When this code is run, the TreeView Table control is not populated yet. To force the TreeView Table control to be filled in this code, use:
You can also filter records with HFilter.
End of initialization (Server code)Code only for browsing TreeView Table controls populated automatically
Run once the TreeView Table control has been populated. This code enables you to select an element in the control, or to add or modify an element.
Selecting a table row (Server code)Code run when the user selects a row in the TreeView Table control.
Row display (Server code)Run when a new row must be displayed in the TreeView Table control: the TreeView Table control is redisplayed, scrolled or moved, etc.
Used to manage the calculated columns.
Table click (Browser code)Run when the Web user selects a row.
Exit from a row (Server code)Run when moving from one row or control to another (TAB key, selecting another control with the mouse, etc.).
Row selection (Browser code)Run when the user selects a row (without input).
Filtering the records (Server code)Code only for browsing TreeView Table controls populated automatically
Run just before displaying a row. This event is used to filter the records that must be displayed in the TreeView Table control. This event is detailed at the end of this page.
Collapsing, Expanding a row (Server code)Run when the user collapses or expands a row (or branch).
Remark: to get the name of the collapsed/expanded row in this event, use the following syntax: TreeViewTableName[TreeViewTableName].
WEBDEV - Server codeWEBDEV - Browser code WEBDEV manages the following events by default (order of appearance in the code editor):
EventRuntime condition
Initialization (Server code)Run when the page is opened.
Special case: Browsing TreeView Table control populated automatically:
When this code is run, the TreeView Table control is not populated yet. To force the TreeView Table control to be filled in this code, use:
Run when the page is opened.
Special case: Browsing TreeView Table control populated automatically:
When this code is run, the TreeView Table control is not populated yet. To force the TreeView Table control to be filled in this code, use:
You can also filter records with HFilter.
End of initialization (Server code)Code only for browsing TreeView Table controls populated automatically
Run once the TreeView Table control has been populated. This code enables you to select an element in the control, or to add or modify an element.
Selecting a table row (Server code)Code run when the user selects a row in the TreeView Table control.
Row display (Server code)Run when a new row must be displayed in the TreeView Table control: the TreeView Table control is redisplayed, scrolled or moved, etc.
Used to manage the calculated columns.
Table click (Browser code)Run when the Web user selects a row.
Exit from a row (Server code)Run when moving from one row or control to another (TAB key, selecting another control with the mouse, etc.).
Row selection (Browser code)Run when the user selects a row (without input).
Filtering the records (Server code)Code only for browsing TreeView Table controls populated automatically
Run just before displaying a row. This event is used to filter the records that must be displayed in the TreeView Table control. This event is detailed at the end of this page.
Collapsing, Expanding a row (Server code)Run when the user collapses or expands a row (or branch).
Remark: to get the name of the collapsed/expanded row in this event, use the following syntax: TreeViewTableName[TreeViewTableName].
Optional events
Several optional events can be managed. 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, for example:
  • the mouse hover over the control,
  • left mouse button down, up, with a double click,
  • the right mouse button down, up, with double click,
  • the mouse wheel, etc.
Remark: The optional events differ according to the environment (WINDEV, WEBDEV, WINDEV Mobile) and the development platform.
WINDEVWEBDEV - Server codeiPhone/iPad
Filtering records (browsing TreeView Table control only)
The event "Filtering the records" is run right after a row of the TreeView Table control is displayed. Therefore, it is run:
  • when initializing the control.
  • whenever a row is displayed in the TreeView Table control.
This event is used to filter the records displayed in the TreeView Table 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 Table control (very rare case).
Example:
// -- Filtrage des enregistrements --
// Affiche uniquement les clients dont commandes sont supérieures à 3000 euros
IF Commande.TotalTTC >= 3000 THEN
RETURN True
ELSE
RETURN False
END
In this code, the data handled affects the record currently read by the TreeView Table control. This data comes from the date file or from the query linked to the control.
If an automatic filter is applied on the TreeView Table control (TableEnableFilter or filter enabled directly by the user), the filter defined by the event "Filtering records" is added to the automatic filter.
Versions 17 and later
WINDEV
Before displaying the automatic tooltip of scrollbar
The tooltip for the scrollbar of TreeView Table controls is displayed when the user clicks the "box" of the vertical scrollbar in the treeview table.
This tooltip contains the following information by default:
  • Range of rows currently displayed in the TreeView Table control.
  • Total number of rows in the TreeView Table control.
  • Information about the element currently displayed in the first row of the control in the sorted column.
The optional event "Before displaying the automatic tooltip of the scrollbar" is run just before the tooltip is displayed. This allows displaying a specific text in tooltip of the TreeView Table control using the ToolTip property, for example.
New in version 17
WINDEV
Before displaying the automatic tooltip of scrollbar
The tooltip for the scrollbar of TreeView Table controls is displayed when the user clicks the "box" of the vertical scrollbar in the treeview table.
This tooltip contains the following information by default:
  • Range of rows currently displayed in the TreeView Table control.
  • Total number of rows in the TreeView Table control.
  • Information about the element currently displayed in the first row of the control in the sorted column.
The optional event "Before displaying the automatic tooltip of the scrollbar" is run just before the tooltip is displayed. This allows displaying a specific text in tooltip of the TreeView Table control using the ToolTip property, for example.
WINDEV
Before displaying the automatic tooltip of scrollbar
The tooltip for the scrollbar of TreeView Table controls is displayed when the user clicks the "box" of the vertical scrollbar in the treeview table.
This tooltip contains the following information by default:
  • Range of rows currently displayed in the TreeView Table control.
  • Total number of rows in the TreeView Table control.
  • Information about the element currently displayed in the first row of the control in the sorted column.
The optional event "Before displaying the automatic tooltip of the scrollbar" is run just before the tooltip is displayed. This allows displaying a specific text in tooltip of the TreeView Table control using the ToolTip property, for example.
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment