Jump to content


Photo
- - - - -

Tree Control - Anyone have examples?


  • Please log in to reply
No replies to this topic

#1 Jim Kring

Jim Kring

    packages everywhere!

  • JKI
  • 1,901 posts
  • Location:Lafayette, CA
  • Version:LabVIEW 2011
  • Since:1995

Posted 26 May 2003 - 05:42 PM

I am interested to see how people are using the new Tree Control. Are you going to use them in conjunction with an event structure? For example there are some pretty cool tree structure events:

Tree Events (unique to Tree Control)
* Double-Click
* Drag
* Drop
* Item Open
* Item Close

As I see things, a Tree Control is a tool for visualizing some data structure (as opposed to a control that actually stores your data). When the user changes the tree control, by dragging and dropping items, one then has to capture information about the changes and then implement changes to the data structure that the tree represents. The Tree Control's events seem critical in this process. More power is given to also Filter events. For example, if the user does some Illegal action, the event can optionally be discarded.

Have you learned any insights that might be helpful to others?

One thing that I discovered is that in order to clear the entire contents of the Tree Control you have to call the "Edit Tree Items:Delete" method and pass an empty string to the "tag" input (shown in the image below). This was very non-intuitive, to me. I don't like functionality hidden inside of other functions -- I would prefer to have another method called "Delete All".

Posted Image