PC SOFT

WINDEV的在线文档

  • Overview
  • Handling the elements of a Treeview control directly
  • In the WLanguage Treeview control management functions
  • To handle a Treeview control element directly
  • Initializing an element in a Treeview control
  • Initializing an element
  • Associating a tooltip with an element
  • Selecting an element in a TreeView control
  • Selecting the element of the row whose subsctript is
  • Positioning on the last element of the Treeview control
  • Retrieving the element selected in the Treeview control
  • WLanguage properties associated with a Treeview control elements
  • Using the properties on a Treeview control element
  • Examples
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系: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本地访问

Handling an element of a TreeView control by programming

Handling the elements of a Treeview control directly

In the WLanguage Treeview control management functions

"<Root Name>"+TAB+["<Name of 1st Node>"+TAB+...
["<Name of 2nd Node>" +TAB+ [...]]]"<Leaf Name>"

The different elements that constitute the path of characters strings are separated by TAB characters.

WinDev

To handle a Treeview control element directly

  • Operation performed via the subscript of the element:
    All you have to do is use the following notation: <Treeview Control Name> [ <Element Subscript>].
    Caution: The specified subscripts only take the visible elements into account.
    Example: Modifying the color of the 5th element displayed in a Treeview control:
TREE_MyTreeView5】..颜色=浅红色
  • Operation performed via the full path of the element:
    All you have to do is use the following notation: <Treeview Control Name> [ <Element Path>].
    The path of the element is a character string in the following format:
"<Root name>" + TAB + ["<Name of 1st node>" + TAB +...
["<Name of 2nd node>" + TAB + [...]]]"<Leaf name>"
Example: Modifying the color of the "Pineapple" element.
TREE_MyTreeView"Recipe"+TAB+"Dessert"+TAB+"Pineapple"】..颜色=浅红色

You can also use the following notation to designate the current element in a Treeview control:

我自己【树视图选择(我自己)】

Initializing an element in a Treeview control
WinDev

Initializing an element

To initialize an element in a Treeview control, use 树视图添加.During this addition, you can:

WinDev

Associating a tooltip with an element

To associate a tooltip with an element in a Treeview control, you can use:If the text of the element tooltip is not specified, the text displayed will be the text of the tooltip for the TreeView control (if it exists).

Reminder: By default, the tooltip associated with the different controls is displayed. To specify whether the tooltips must be displayed or not, use 工具提示启用.

Selecting an element in a TreeView control
WinDev

Selecting the element of the row whose subsctript is <Subscript>

To select the element found at <Subscript> row, use:
  • the direct assignment: <TreeView>=Subscript. If the row is displayed in the Treeview control, the corresponding element is selected.
  • 树视图选择元素: 树视图选择元素(<Treeview Control Name>,<Full Element Name>)

WinDev

Positioning on the last element of the Treeview control

To point to the last Treeview control element, use ..数目: <TreeView> = <TreeView>..数目

Retrieving the element selected in the Treeview control
To retrieve:
  • the subscript of the selected element, use a direct reading of the element: subscript = <TreeView Control>.
  • the full path of the selected element, use 树视图选择: <Path> = TreeSelect(<TreeView Control>).
  • the identifier of the selected element, use 树视图获取标识符.

WLanguage properties associated with a Treeview control elements
WinDev

Using the properties on a Treeview control element

Several WLanguage properties can be used on the elements of a Treeview control.

To find out the entire list of WLanguage properties that can be used on an element found in a TreeView control, see Properties associated with a row in a Treeview control.

WinDev

Examples

Example: How do I modify the color of a Treeview control element:

TREE_MyTreeView5】..颜色=浅红色

Example: How do I modify the size of the font used for a Treeview control element:

TREE_MyTreeView"Recipe"+TAB+"Dessert"+TAB+"Pineapple"】..字体大小=14