PC SOFT

WINDEV的在线文档

  • Overview
  • Principle
  • Implementation
  • Defining an identifier for managing the duplicates
  • Handling an element via its identifier
  • Finding out the identifier of an element
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系: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本地访问

Overview
WinDev, WinDev Mobile and WebDev allow you to add duplicates into the elements of a TreeView control. The mechanism for managing the duplicates in the TreeView controls allows you to easily handle these duplicates.

Principle
The management of duplicates in the TreeView controls is based on the management of the identifiers for each treeview element.

Indeed, when adding, inserting or modifying an element in a TreeView control, you have the ability to specify an identifier for the element used. This identifier (defined by the developer) will be used to identify the duplicate handled by the user.

The principle is straightforward: all you have to do is use a different identifier for each duplicate. This identifier will be retrieved by the functions for treeview management and it will be used to identify the duplicated handled.

Implementation

Defining an identifier for managing the duplicates

The definition of an identifier is performed when adding or modifying an element to a Treeview control.

To associate an identifier with an element found in a TreeView control, this identifier must be specified in the following programming functions:

树视图添加在树视图控件中添加一个";叶子";元素(以及所有必要的节点)。
树视图插入将一个叶节点插入到一个树视图控件的一个指定位置。
树视图修改在树视图控件里修改一个元素(节点或工作表)。

Example:

ResultTreeView布尔型
ResultTreeView树视图添加TREE_TreeView1"Root"+TAB+"Node"+TAB+"Leaf",...
树视图.默认树视图.默认"Leaf ID"
ResultTreeView树视图添加TREE_TreeView1"Root"+TAB+"Node"+TAB+"Leaf",...
树视图.默认树视图.默认"ID of Leaf 2"树视图.允许重复

Handling an element via its identifier

To handle a duplicate element, its identifier must be known and specified.

to handle an element whose path is known, each path element must be filled (if necessary) by its identifier via 树视图ID.

Example: To add a leaf to the "Root"+TAB+"Node"+TAB+"Leaf" element, whose identifier is "Leaf ID", use the following syntax:

ResultTreeView树视图添加TREE_TreeView1"Root"+TAB+"Node"+TAB+"Leaf"+...
树视图ID"Leaf ID")+TAB+"My Element"树视图.默认树视图.默认"My Element 1"

树视图ID can also be used with the following syntax: <TreeView Name> [ <Element Path>].

For example:

TREE_TreeView1"Root"+TAB+"Node"+TAB+"Leaf"+树视图ID"Leaf ID")+...
TAB+"My Element"】..颜色=浅红色

Finding out the identifier of an element

To find out the identifier of a treeview element, all you have to do is use 树视图获取标识符.

When managing the duplicates, the identifier is an integral part of the path as it is used to identify the selected element.

Therefore, the WLanguage functions returning the path of an element (when selecting an element for example) can return:

  • the path of the element while ignoring the identifier.
  • the path of the element by including (if necessary) the identifier of each element found in the path.
The affected functions are as follows:
树视图子元素列表列出一个节点的"子元素"和这些"子节点"的"子元素"。
树视图位置显示一个从指定元素(节点或树叶)出发的树视图控件或者返回在树视图控件中显示的第一个元素的名称。
树视图选择返回一个树视图控件中被选中的元素的完整路径。.