• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2393
  • Last Modified:

TcxTreeList.NODES property GONE? (Quantum Tree List upgrading 4 to 5)

I'm trying to compile my project with the new TcxTreeList but I'm getting this error:
Undeclared identifier: 'Nodes'

About 20 of them, originating from lines such as:
ListGroup.Nodes.Clear;
ListGroup.Nodes.Items[2].AddChild;
etc, etc.. list goes on

Keep in mind that ListGroup = TcxTreeList


Anybody know what became of 'NODES'?

Thanks
0
John86a
Asked:
John86a
  • 5
  • 2
  • 2
  • +1
1 Solution
 
jimyXCommented:
TcxTreeList.Nodes has been updated to TcxTreeList.AbsoluteItems
0
 
John86aAuthor Commented:
Hi again jimy! Upon compiling I'm still getting an error,
for i := 0 to tree.Nodes.Count - 1 do
Changed to
for i := 0 to tree.AbsoluteItems.Count - 1 do
Getting
uXXXX.pas(98): '[' expected but '.' found

Any idea? Thanks
0
 
John86aAuthor Commented:
Also for this line:
for i := 0 to tree.AbsoluteItems.Count - 1 do

uXXXX.pas(951): '[' expected but '.' found
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
John86aAuthor Commented:
Sorry, I meant this line:
ListGroup.AbsoluteItems.Clear;

'[' expected but '.' found
0
 
Ephraim WangoyaCommented:

No sir, you have to use the Items property

eg

ListGroup.Items.Clear;
ListGroup.Items[2].AddChild;
0
 
Geert GOracle dbaCommented:
ListGroup is a Tree ?
a odd naming convention ...

use AddNode

var item: TcxTreeListNode;
begin
  item := TcxTreeListNode.Create(cxTreeList1);
  item.Texts[0] := 'First column';
  item.Texts[1] := 'Second column';
  cxTreeList1.AddNode(item, nil, nil, tlamAdd);
0
 
John86aAuthor Commented:
Actually, none of the above satisfies 100% of the problem, as on the following screenshot shows that there is no 'clear' property in there.

 screenshot
0
 
Ephraim WangoyaCommented:

Correct, just call clear directly from the tree object

ListGroup.Clear;
0
 
Geert GOracle dbaCommented:
you are probably looking for

ListGroup.Root.Items[n]
0
 
jimyXCommented:
Confirming my post "TcxTreeList.Nodes has been updated to TcxTreeList.AbsoluteItems"
It is not just a word-to-word replacement, you have to use the appropriate "Absolute" property:

Your loop will be:
for i := 0 to tree.AbsoluteCount - 1 do

And for AbsoluteItems you have to provide an index (integer value):
AbsoluteItems[index].xxxx;
0
 
John86aAuthor Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 5
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now