LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you clear out a tree control?

I am editing items in a tree control, when the editing is complete, I re-build the tree to represent what I have after the edit.  My process of deleting the items one-by-one has worked fine until the tree scrolled off the top, then, when I select the top-left item and delete everything under it, I miss the ones that have scrolled off the top.

What's the method/property I should use to clean out a tree in one operation?  (before rebuilding)

   ...Dan
0 Kudos
Message 1 of 5
(6,814 Views)
A chainsaw?
 
Sorry Dan, I can't answer your question, but I couldn't pass up the opportunity to answer what method/property I should use to clean out a tree in one operation?
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 2 of 5
(6,806 Views)
Smiley Very HappySmiley Very HappySmiley Very HappySmiley Very Happy  Tray Drool!
Smiley Very Happy
Originally I had, "How do you clear out a tree?".  That's why I added "control".
Message 3 of 5
(6,796 Views)
Create an invoke node (Functions->Application Control->Invoce ), wire the tree ref, change the method to Delete and wire the Delete Children to True.

If you look at the Directory Hierarchy in  Tree Control example (search for 'tree'), this is the first method used in the subvi called Init_open_close.vi.


2006 Ultimate LabVIEW G-eek.

Message 4 of 5
(6,793 Views)
Dopey me!  I guess it wasn't obvious to me that if I left the "tag" unwired, it would clear out the whole thing, I was trying to delete all the tags one-by-one.  Thanks
0 Kudos
Message 5 of 5
(6,781 Views)