Why is it that tree controls return the tags of the items selected in the order they are selected, whereas the listbox returns the row number of the items selected in numeric order? Is there any way to have a tree control return the selected items in the order they appear on screen?
LabVIEW will not automatically return "original order" tags to another tree or other control. You can program this yourself by knowing the parent,child relationship. Could you attach an example of what you are trying to do. I have some experience with the tree invoke nodes and may be able to help.
BTW: how are you setting the tags in the first place?
I've attached an example illustrating how listboxes return selected items in order and trees do not. If you click on one of the bottom items, hold control, then click on one of the top items, the listbox will return the row numbers in numeric order whereas the tree returns the tags in the order you clicked them. It would be nice if the tree returned the tags in the order on the screen.
The actual code I am using the tree in is for a plot legend that allows users to select which graphs to make visible. I've already made a workaround that works fine, I was just trying to use a for loop that looked at each item in the listbox or tree and made a plot visible or invisible according to the items selected. However, this required selected items to be in order. I know this probably isn't a very common use of a tree, since I only deal with parents, but some features involving cell coloring when cells are deleted work very well for my application.
If the ordering is just how it is for trees, I guess I'll have to accept it....
Good idea; its not quite what I need. If, for example, in your code you click on "you", hold the control button, then click on "Hello", in the listbox it will return "0,3" in a 1D array, but in the tree doing the same thing it will return "3,0" in a 1D array.