LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to programmatically select an item of a tree?

I,

I have a vi that I want to use only with a keyboard. There is a tree in this one. In this vi we can select an item, with the arrows of the keyboard, and put the color of the item background red or green.
After a loop to put all red, (property node, ActiveItem->Line and ActiveCell->background color), the active item is the last of the tree, but the selected item isn't the same. If I set the Active Item to 0 after the loop, and then I press down arrow of the keyboard, the item selected will be the next after the one before the loop, and it's not from the start of the tree.

(Sorry for the English)

I want to select a Cell Prgrammatically but I didn't find anything in the property or Invoke nodes...

Thanks a lot.

Barto
0 Kudos
Message 1 of 13
(5,189 Views)
Just use the terminal of the tree control (if it's an indicator), or a local variable, to set the current value (selected tag) of the tree.
 
-D
0 Kudos
Message 2 of 13
(5,178 Views)
It's a command, not an indicator, and I tried it and I had no results... When I set the value as you told me, with a local variable, the value changes and the selected item is this one I choose, but if I press an arrow (down for example), the next item selected will be this one under the last...
Thank you for your quick answer 😉
0 Kudos
Message 3 of 13
(5,171 Views)

Hmm, the only other idea I have is trying the "Value(Signaling)" property to set the value...does that do the trick?  If not, I'm not sure how to change the "highlighted" option that you can change with the keyboard...

-D

0 Kudos
Message 4 of 13
(5,168 Views)
It's the same... Tomorrow - if I find some time to - I will make you an example to show you concretly what I mean.

Thanks and see you tomorrow.

Barto
0 Kudos
Message 5 of 13
(5,161 Views)

Here is the little program who illustrates my answer.

Thanks for helping me.

Barto

Message Edité par Barto le 01-31-2007 07:55 AM

0 Kudos
Message 6 of 13
(5,130 Views)
Hi Barto,
 
Thanks for attaching a VI that demonstrates the problem.  This is not the intended behavior of the tree control.  I have filed a bug report to R&D (CAR 45UDSMF2) for further investigation.  I don't know of any workaround at this time.
 
-D
0 Kudos
Message 7 of 13
(5,115 Views)
Ok thanks Darren.
But how long will it take to have a solution? It's the only trouble of my application that I have to finish for the end of the next week...!
 
Regards,
 
Barto
0 Kudos
Message 8 of 13
(5,105 Views)

There is no known workaround to this issue at this time.  Unfortunately, the issue will not be fixed until a future LabVIEW release.

Sorry for the inconvenience,
-D

0 Kudos
Message 9 of 13
(5,086 Views)

This problem doesn't appear to be fixed for LV 2010.

0 Kudos
Message 10 of 13
(4,310 Views)