Delphi TTreeView学习(三)-- TTreeNode

需要了解的属性:

AbsoluteIndex property AbsoluteIndex: Integer;

Use AbsoluteIndex to determine absolute position of a node in a tree nodes object. The first tree node in a tree nodes object has an index of 0 and subsequent nodes are numbered sequentially. If a node has any children, its AbsoluteIndex is one less than the index of its first child.

Count property Count: Integer;

Use Count to determine how many child nodes belong to a tree node. Count includes only immediate children, and not their descendants. Count can be useful when iterating through the children of a tree node.

Cut property Cut: Boolean;

Use Cut to alter the appearance of the tree node when it is selected as part of a cut and paste operation.

Data property Data: Pointer;

Use the Data property to associate data with a tree node. Data allows applications to quickly access information about the entity represented by the node.

Deleting property Deleting: Boolean;

Deleting returns true if the node object is in the process of being deleted. Use Deleting to prevent infinite recursion in event handlers.

DropTarget property DropTarget: Boolean;

Use DropTarget to indicate that the node is a drag and drop target. When DropTarget is true, the node is drawn in a style used to indicate a drag and drop target.

Note: Setting DropTarget to true does cause the node to automatically accept dragged objects when they are released. The application must still implement the drop behavior.

Expanded property Expanded: Boolean;

When a tree node is expanded, the minus button is shown if the ShowButtons property of the tree view is true and child nodes are displayed. Set Expanded to true to display the children of a node. Set Expanded to false to collapse the node, hiding all of its descendants.

Focused property Focused: Boolean;

Tree view nodes are not windowed controls and so can’t receive input focus. However, they can be edited by the user when the tree view control has focus. When Focused is true, the node is surrounded by a standard focus rectangle and the user can edit the label. Use Focused to determine if a particular node in a tree view can currently be edited by the user.

Handle property Handle: HWND;

Use Handle to obtain the handle of the tree view that owns the node. This handle can be passed as a parameter to Windows API function calls that require a handle to the tree view.

HasChildren property HasChildren: Boolean;

HasChildren is true if the node has subnodes, or false if the node has no subnodes. If ShowButtons of the tree view is true, and HasChildren is true, a plus (+) button will appear to the left of the node when it is collapsed, and a minus (-) button will appear when the node is expanded.

Note: If a node has no children, setting HasChildren to true will show a (+) plus button, but will not add any child nodes and the node cannot be expanded.

ImageIndex property ImageIndex: TImageIndex;

Use the ImageIndex property with the Images property of the tree view to specify the image for the node in its normal state.

Index property Index: Longint;

Use Index to determine the position of the node relative to its sibling nodes. The first child of the parent node has an Index value of 0, and subsequent children are indexed sequentially.

IsVisible property IsVisible: Boolean;

A node is visible if it is on level 0 or if all its parents are expanded. IsVisible indicates whether the node is part of the current tree view image. It does not indicate whether or not the node is scrolled into view when the tree view image is larger than the size of the tree view control.

Item property Item[Index: Integer]: TTreeNode;

Use Item to access a child node based on its Index property. The first child node has an index of 0, the second an index of 1, and so on.

ItemId property ItemId: HTreeItem;

Use this property to reference the nodes when making Windows API calls or calling the GetNode method of the TTreeNodes that owns the item.

Level property Level: Integer;

The value of Level is 0 for nodes on the top level. The value of Level is 1 for their children, and so on.

OverlayIndex property OverlayIndex: Integer;

An overlay mask is an image drawn transparently over another image in the tree view. For example, to indicate that a node is no longer available, use an overlay image that puts an X over the current node's image.

Owner property Owner: TTreeNodes;

Use the Owner property to determine the owner of the tree node. Do not confuse Owner with the TreeView property. Owner is the list of nodes used by the tree view to manage its nodes. The TreeView property is the tree view that uses that list.

Parent property Parent: TTreeNode;

A Parent node is one level higher than the node and contains the node as a subnode.

Selected property Selected: Boolean;

Set Selected to true to select the node. The appearance of a selected node depends on whether it has the focus and on whether the system colors are used for selection. When a node becomes selected, the tree view's OnChanging and OnChanged events are triggered.

SelectedIndex property SelectedIndex: Integer;

Use the SelectedIndex property to specify an image to display when the tree node is selected.

StateIndex property StateIndex: Integer;

Use StateIndex to display an additional image for the node that reflects state information. If StateIndex is -1 then no state image is drawn.

Text property Text: string;

Use Text to specify the string that is displayed in the tree view. The value of Text can be assigned directly at run-time or can be set within the TreeView Items Editor while modifying the Items property of the TTreeView component. If the tree view allows users to edit its nodes, read Text to determine the value given the node by the user.

TreeView property TreeView: TCustomTreeView;

Use TreeView to determine the tree view associated with the tree node.

时间: 2024-11-03 20:45:01

Delphi TTreeView学习(三)-- TTreeNode的相关文章

Delphi TTreeView学习(一)

需要了解的属性: AutoExpand property AutoExpand: Boolean; Set AutoExpand to true to cause the selected item to expand and the unselected items to collapse. BorderStyle property BorderStyle: TBorderStyleTBorderStyle; Set BorderStyle to specify whether the tre

Delphi TTreeView学习(二)-- TTreeNodes

需要了解的属性: Count property Count: Integer; Use Count to determine the number of tree nodes in the tree view that owns the tree nodes object. Count provides an upper bound when iterating through the entries in the Item property array. Handle property Han

[20120509]IOT索引组织表相关信息的学习(三).txt

[20120509]IOT索引组织表相关信息的学习(三).txt 上次链接:http://space.itpub.net/267265/viewspace-719517http://space.itpub.net/267265/viewspace-717272 IOT 是一种特殊的索引结构,使用它能够解决特定场合的应用问题,但是在许多应用中很少使用,更多的是使用堆表.我仅仅在生产系统中对3个表使用,我偏向使用静态以及"只读"的小表. 如果IOT表存在除主键外的第2索引,如果使用它存在物

盖茨:向巴菲特学习三件事

盖茨(左)与巴菲特 6月17日消息,不论你多富有或者多成功,都有学习和进步的空间,比尔-盖茨证明了这点.最近,盖茨在LinkedIn上刊文,称自己从巴菲特身上学到了三件事. 下面就是盖茨刊发的文章: 上个月,我去奥玛哈(Omaha)参加伯克希尔·哈撒韦公司年度股东大会.当中乐趣多多,不只是因为有乒乓球比赛和报纸投掷比赛,还因为我可以向巴菲特学习,知道他是如何思考的. 下面是我过去几年从巴菲特身上学到的三件事: 1.不只是投资 人们从巴菲特身上学到的第一件事是如何投资,考虑到他卓越的投资战绩,这也

零基础入门深度学习(三):卷积神经网络

投稿:Intelligent Software Development 团队介绍:团队成员来自一线互联网公司,工作在架构设计与优化.工程方法研究与实践的最前线,曾参与搜索.互联网广告.共有云/私有云等大型产品的设计.开发和技术优化工作.目前主要专注在机器学习.微服务架构设计.虚拟化/容器化.持续交付/DevOps等领域,希望通过先进技术和工程方法最大化提升软件和服务的竞争力.   在前面的文章中,我们介绍了全连接神经网络,以及它的训练和使用.我们用它来识别了手写数字,然而,这种结构的网络对于图像

Mysql 5.7 Gtid内部学习(三) Gtid和Last_commt/sequnce_number的生成时机

一.Gtid生成类型 这里首先使用源码的解释给出三种类型: AUTOMATIC_GROUP GTID_GROUP ANONYMOUS_GROUP 其中AUTOMATIC_GROUP通常用于主库开启Gtid的情况,GTID_GROUP通常用于备库和使用了GTID_NEXT的情况下. 源码中有详细解释如下: /** Specifies that the GTID has not been generated yet; it will be generated on commit. It will d

AgileEAS.NET SOA 中间件平台5.2版本下载、配置学习(三):配置ActiveXForm运行环境

一.前言      AgileEAS.NET SOA 中间件平台是一款基于基于敏捷并行开发思想和Microsoft .Net构件(组件)开发技术而构建的一个快速开发应用平台.用于帮助中小型软件企业建立一条适合市场快速变化的开发团队,以达到节省开发成本.缩短开发时间,快速适应市场变化的目的.      AgileEAS.NET SOA中间件平台提供了敏捷快速开发软件工程的最佳实践,通过提供大量的基础支撑功能如IOC.ORM.SOA.分布式体系及敏捷并发开发方法所支撑的插件开发体系,以及提供了大量的

谈谈HTML基础代码学习三步走战略:一看、二记、三练

中介交易 http://www.aliyun.com/zixun/aggregation/6858.html">SEO诊断 淘宝客 云主机 技术大厅 虽然现在建立一个网站很简单,只需要三步:一注册域名,二租用空间,三上传程序.但是建立网站之后一直到网站正式上线却需要很多步骤,首先是整理网站的结构.然后是对整个网站的文件代码进行分析与增减,而这个时候问题就出来了,很多站长不会HTML代码,怎么办?一个字:学. 如果你想要在互联网中大展拳脚,那么学会HTML代码是很有必要的,首先HTML代码能

PHP的FTP学习(三)

By Vikram Vaswani Melonfire November 07, 2000 现在,我们已经接触了PHP关于FTP的大量函数,但这仅仅只是函数,离我们的目标还远远不够,要显示出这些函数的真正力量,我们应该建立一个程序,这个程序能以WEB方式上传,下载文件---这就是我们将要做的! 在我们进入代码前,我想要告诉大家的是,这个例子仅仅只是为了向大家解释PHP的各种FTP函数的使用,很多方面还不够完善,比如说,错误分析等,至于你想应用到你自己的程序中,你应该进行一些修改! 程序包括以下几