Re: TreeView
- From: alanglloyd@xxxxxxx
- Date: 1 Jun 2005 08:04:13 -0700
Colin Basterfield wrote:
> Hi there,
>
> I am using TTreeView, and like my Conditional compilation question of
> yesterday I haven't ever used TreeView either, despite using Delphi since it
> first came out!!!
>
<snip>
Treeviews are a little strange to add nodes to (well I found them so
<g>).
The nodes are a TTreeNode in the TTreeView.Items (which is a TTreeNodeS
collection). To add a TTreeNode to a TTreeNodeS you call Add, AddChild,
AddFirst, or AddChildFirst specifying the appropriate node to add to as
a sibling or to add as a sibling child. A simple Add or AddChild adds
at the end of the siblings, AddFirst or AddFirstChild adds in the first
position. The TTreeNode added is returned by the call to Add???.
For adding the top level nodes you specify nil as the node to add to.
If you're iterating through the nodes TTreeView.Items.GetFirstNode,
followed by TTreeNode.GetNext??? on the returned node is quicker than
accessing them as an array of TTreeView.Items[].
Alan Lloyd
.
- References:
- TreeView
- From: Colin Basterfield
- TreeView
- Prev by Date: Re: TreeView
- Next by Date: Re: Any components for voice over ethernet ?
- Previous by thread: Re: TreeView
- Next by thread: Re: TreeView
- Index(es):
Relevant Pages
|