TGListTree : hiding some items?

Dear all,

I have a big TGListTree and I would like to allow users to filter it and hide the non-matching elements. I can’t find any method to actually hide a TGListTreeItem. I don’t want to delete the item because I might need it right after again and I also embed data in it.
So, did I miss a useful method that does this ?
Otherwise, would it be possible to introduce such a method ?

Thanks in advance,
Barth

Hi Barth,

There is no such method in TGListTree… But what is the problem with adding and removing list tree items yourself (as deleting item doesn’t delete user data…)?

Chers, Bertrand.

Hi Bertrand,

I thought that deleting item would delete user data. If it’s not the case, then it should be ok to remove list tree items myself.

Thanks for your answer.

Barth

Hi Barth,

By default, TGListTreeItem donen’t own the user data:

Cheers,
Bertrand.