PC SOFT

WINDEV的在线文档

  • Overview
  • Examples
  • Example 1
  • Example 2
  • Example 3
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系: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本地访问

How do I fill a Treeview control from a data file?

Overview
16版本和更高版本
WinDev From version 16, data binding is offered on TreeView controls: the control can be directly linked to a data file or to a variable. See TreeView control linked to a variable or to a data file for more details.
16新版本
WinDev From version 16, data binding is offered on TreeView controls: the control can be directly linked to a data file or to a variable. See TreeView control linked to a variable or to a data file for more details.
WinDev From version 16, data binding is offered on TreeView controls: the control can be directly linked to a data file or to a variable. See TreeView control linked to a variable or to a data file for more details.

By default, the TreeView control cannot automatically display the data coming from a data file.

Let's see some examples used to perform this operation.

This algorithm is used to fill a Treeview control from a data file:

// Read the file
H读第一个FileNameKeyName
只要H超出()=
// Add into the treeview
树视图添加NameTreeViewControlMyRoot+TAB+Branch+TAB+Leaf
H读下一个FileNameKeyName
结束

Examples

Example 1

// Read the file
H读第一个CompanyCity
只要H超出()=
// Add into the treeview
树视图添加TreeViewControlCompany.City+TAB+Company.CompName
H读下一个CompanyCity
结束

Example 2

// Read the file
H读第一个CustomerCustName
只要H超出()=
// Add into the treeview
树视图添加TreeViewControl左边取值Customer.CustName1)+TAB+Customer.CustName
H读下一个CustomerCustName
结束

Example 3

// Read the file
对于每个Customer根据CustName
// Add into the treeview
树视图添加TreeViewControl左边取值Customer.CustName1)+TAB+Customer.CustName
结束