10-02-2006 04:35 AM
10-02-2006 09:32 AM
10-03-2006 07:00 AM
And just in case you do want to go with your original method, I have done this in the past with a listbox, where you can't control the selected items. The key is to use the Mouse Enter and Mouse Leave events to trigger the key on and off.
This is the VI I used then, because it's what I had floating around, but basically, almost every Windows VI to do this would look basically the same.
10-03-2006 08:58 AM
10-03-2006 09:51 AM - edited 10-03-2006 09:51 AM
Message Edited by Goju-Ryu on 10-03-2006 09:52 AM
10-03-2006 10:06 AM
You need to change the selection mode of your tree from "1 or more items" to "0 or more items". To do this, right-click the tree control and choose "Selection Mode > 0 or More Items".
-D
10-03-2006 10:10 AM
10-03-2006 10:28 AM
I don't think you will get a Value Change event if you click a tag that's already selected. You may need to employ the Mouse Down event for that case.
-D
10-03-2006 10:32 AM - edited 10-03-2006 10:32 AM
Message Edited by Goju-Ryu on 10-03-2006 10:33 AM
10-03-2006 11:10 AM
What I said is correct...when you only have one object selected in the tree, and you try clicking that object, you will not get a value change event. You can check out the attached VI to verify this (it does the same thing your VI does, but it's a lot simpler). If you want to support having the user click the final item to deselect it (thus leaving zero items), you will need to take the Mouse Down approach.
Good luck,
-D