Jump to content

Recommended Posts

Posted

Message from: "bettersoft"

 

var iLen, ii, image: integer;

begin

image:=1;

iLen: = UniTreeView1.Items.Count;

for ii: = 1 to iLen do

begin

EmrUniTreeView.Items [ii-1]. ImageIndex: = image;

end;

end;

 

The TreeView 5 layer nodes, a total of more than 2,000 nodes. All traverse a

node is very slow, to 10 minutes, I just change the node icon. Traversal

methods are no good? In Vcl in quickly.

And traversal, all nodes must be Expanded = True. Otherwise it will error.

 

 

.

 

Posted

Message from: "Farshad Mohajeri"

 

Tree with 2000 nodes? Seems lots of subnodes are there.

 

It is better to assign the ImageIndex just after you create the node.

I will test and try to improve the speed.

 

"bettersoft" wrote in message

news:%23S98jDO%23LHA.1984@anaxagvs227...

> var iLen, ii, image: integer;

> begin

> image:=1;

> iLen: = UniTreeView1.Items.Count;

> for ii: = 1 to iLen do

> begin

> EmrUniTreeView.Items [ii-1]. ImageIndex: = image;

> end;

> end;

>

> The TreeView 5 layer nodes, a total of more than 2,000 nodes. All traverse

> a node is very slow, to 10 minutes, I just change the node icon. Traversal

> methods are no good? In Vcl in quickly.

> And traversal, all nodes must be Expanded = True. Otherwise it will error.

>

 

 

.

 

Posted

Message from: "bettersoft"

 

In the Vcl, delphi own TreeView, TreeView1.item.Count, should be the first

stage the number of nodes. However, the number of nodes

uniTreeview.items.Count all. So a traversal is very troublesome. If I want

to be first-level node traversal, we must traverse all the nodes, and then

look unitreeview.Level = 0 nodes.

If the traversal process, the need to modify the imageindex, very slow, and

the system sometimes error, can all nodes must be expanded = True? but when

expanded = Ture, modify imageindex sometimes error.

 

 

.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...