12-15-2009 01:54 PM
I am trying to figure out how to only select the final children from a tree not to include parent tags.
12-15-2009 03:45 PM
12-15-2009 03:59 PM
12-15-2009 04:33 PM
12-15-2009 04:35 PM
12-15-2009 04:41 PM - edited 12-15-2009 04:48 PM
There is a right click menu setting of "Allow Selection of Parents" which you can uncheck. But for some reason with your VI, if I check that, then nothing really gets selected.
Other odd things about your VI. When I first open it and do a Ctrl-E to go to the block diagram, the block diagram doesn't show right away. I have to click around to see it. When I run it, when I click the C7 parent, the string shows up as C7, but with the others, it will show up as CC6, or CC5.
I'm not that familiar with tree controls, I'm just trying to learn more about them by helping to answer your question. I would recommend that you look over that link to Lava in your other message thread where some VI's were posted to help handle tree controls.
EDIT: For the items you want to be children, you need to right click them and set them as Child Only? to be able to select them when the Allow Selection of Parents is unchecked.
Hey Ben, Isn't your reply saying the same thing I said in my reply earlier?
12-15-2009 04:49 PM
12-15-2009 05:15 PM
Try the attached VI, it uses the event structure to catch a mouse down event on the tree control and converts the click coordinates to a tag and column, from which you can get just the string of the item selected. You need to check if the selected item's tag is not an empty string and the click was in bounds before getting the item string. Hope this is helps!
-RW