Hello
I’d like to remove all items in a TGlistTree
i’d believe that Removeall() method could do it but
It seems no to do it…
for example
fTGlistTree->Removeall();
gCLient->DoReDraw();
display again fTGlistTree
( so a i see the tree twice)
Any idea?
Thank a lot
Luc
Hi,
There is no method called Removeall() in TGListTree…
You can use :
TGListTree::RecursiveDeleteItem(TGListTreeItem *item, void *userData)
Cheers,
Bertrand.
Thank a lot
I’ll try
but how to use RecursiveDeleteItem(TGListTreeItem *item, void userData)
when we want to remove all?
RecursiveDeleteItem(0,’’) ???
Luc
Hi Luc,
Something like this:
fListTree->RecursiveDeleteItem(fListTree->GetFirstItem(), fListTree->GetFirstItem()->GetUserData());
Cheers, Bertrand.
Sorry
I get same result!
fListTree->RecursiveDeleteItem(fListTree->GetFirstItem(), fListTree->GetFirstItem()->GetUserData());
seems not to empty GVListTree.
…?
Maybe a kind of method RemoveAllItems() can be usefull for next Root version?
Luc
Could you post a macro showing the problem, please?
–Bertrand.