PC SOFT

WINDEV的在线文档

  • Processes managed by default
  • Processes managed by WinDev and WinDev Mobile
  • Special case: Collapsed/Expanded node
  • Optional processes
  • Filtering records (browsing treeview only)
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Processes associated with the TreeView controls

Processes managed by default
WinDev

Processes managed by WinDev and WinDev Mobile

WinDev and WinDev Mobile manage the following processes by default (in the order in which they appear in the code editor):
ProcessRuntime condition
InitializationRun when opening the window. Used to initialize the content of the TreeView control for example. (*)
16版本和更高版本
End of initialization
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.
16版本和更高版本
Enter a row in input
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.
16版本和更高版本
Row exit
16新版本
Row exit
Row exit
Run when changing row or when changing control (TAB key, change of control with the mouse, ...) from a row.
Caution: This code is available only if the input is allowed by the TreeView control.
16版本和更高版本
Row display
16新版本
Row display
Row display
Run when a new row must be displayed in the TreeView control.
Row selectionRun 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: During a click or a double click, this process is run with the click process. This process is run before the requested action is performed.

Note: This process can accept parameters (see below).
16版本和更高版本
Filtering records
(optional process)
16新版本
Filtering records
(optional process)
Filtering records
(optional process)
Process taken into account for the browsing treeviews only

Run just before displaying a row. This process is used to filter the records that must be displayed in the TreeView control. This process is presented in details at the end of this page.

(*) By default, the "Initialization" process of each control is run according to the creation order of the controls in the window. To modify this runtime order:
  1. Select "Windows .. Edit the initialization order".On the "窗口" pane, in the "顺序" group, click "初始化".
  2. In the window that is displayed, use the arrows on the right to modify the initialization order of controls.

Special case: Collapsed/Expanded node
WinDev The "Collapse, expand a node" process is run when a branch of the TreeView control is collapsed or expanded by a click or a double click performed by the user.

Caution: This process must not delete the current node.

This process can accept parameters.

To manage these parameters, a procedure must be declared in the "Collapse, expand a node" process.

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.
15版本和更高版本
<Identifier>
15新版本
<Identifier>
<Identifier>
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 树视图添加.
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 树视图添加.
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 树视图添加.

Example:

Optional processes
WinDev Several optional processes can be managed.

To manage an optional process, all you have to do is select it in the icon bar of the code window.

You have the ability to manage:

  • the rollover of the control by 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 only)
16版本和更高版本
WinDev The "Filtering records" process is run just after the display of a row of the TreeView control. Therefore, it is run:
  • when initializing the TreeView control.
  • whenever displaying a new row of the TreeView control.
This process is used to filter the records that must be displayed in the TreeView control.

To implement a filter, the "Filtering records" process must return a value:

  • to specify that the record corresponds to the filter and that it must be displayed.
  • to specify that the record does not correspond to 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.
16新版本
WinDev The "Filtering records" process is run just after the display of a row of the TreeView control. Therefore, it is run:
  • when initializing the TreeView control.
  • whenever displaying a new row of the TreeView control.
This process is used to filter the records that must be displayed in the TreeView control.

To implement a filter, the "Filtering records" process must return a value:

  • to specify that the record corresponds to the filter and that it must be displayed.
  • to specify that the record does not correspond to 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.
WinDev The "Filtering records" process is run just after the display of a row of the TreeView control. Therefore, it is run:
  • when initializing the TreeView control.
  • whenever displaying a new row of the TreeView control.
This process is used to filter the records that must be displayed in the TreeView control.

To implement a filter, the "Filtering records" process must return a value:

  • to specify that the record corresponds to the filter and that it must be displayed.
  • to specify that the record does not correspond to 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.