02-01-2006 10:21 AM
02-01-2006 10:32 AM
Hello,
There is no way to add an actual button to a tree, but you can add glyphs to tree items, and monitor the tree for clicks and make the glyphs behave like buttons. I took this approach in the VI Analyzer, where I have checkbox glyphs next to each tree tag in one of my trees, and when you click the glyph it changes from checked to unchecked (and vice-versa). The code for this was not trivial. If you are using LabVIEW 7.1 or earlier, you will need to use the Point to Row-Col.vi in vi.lib\tree. If you are using LabVIEW 8.0, there is actually a Point to Row-Col method on the tree that you can use along with a Mouse Down event on the tree to change the glyph when the user clicks on the tree and the click is within the bounds of the glyph.
Hope this helps you get started. Good luck,
-D