Board index » delphi » TreeView Sort problems...

TreeView Sort problems...

How can I sort my TTreeView component after numbers?

I've got 80 nodes in my TreeView, named 1 - 80. And I want the node named
"1" first and the node named "80" last.

The AlphaSort doesn't work since it only sort alphabetically....
So maybe the CustomSort should do the trick, but how do I use that function?

This doesn't seem to hard, but I just can't figure it out...

 

Re:TreeView Sort problems...


You could skip sort callback functions and use TVI_LAST flag when
inserting the items. This is also faster than TVI_SORT if there is
thousands of items.
Regards,
Barmak
Quote
kalle wrote:

> How can I sort my TTreeView component after numbers?

> I've got 80 nodes in my TreeView, named 1 - 80. And I want the node named
> "1" first and the node named "80" last.

> The AlphaSort doesn't work since it only sort alphabetically....
> So maybe the CustomSort should do the trick, but how do I use that function?

> This doesn't seem to hard, but I just can't figure it out...

Other Threads