LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
hujhax

Tree Property: "Item Data"

Status: New

For as long as we've had tree controls, users have wanted to associate data with tree items.


To address this, we could add a new "Item Data" property to the tree, like so:

 

ItemDataDemo  FP fixed.jpg            ItemDataDemo copy.jpg


If we make it a variant type, users can store whatever kind of data they want in it.

6 Comments
Darren
Proven Zealot

Any LabVIEW developer who does not vote for this idea has either (1) never programmed a tree control, (2) forgotten how much of a pain it is to pair tree tags with data structure elements, or (3) lost his mind...probably because he programmed too many tree controls.

Sergey_Kolbunov
Member
I agree with the idea, but still I should argue that the LabVIEW Tree Control in its current implementation is not a good storage for data. It works good unless you need to operate on large trees. I programmed enough tree controls and in many cases I need to operate on trees having thousands items. Operation like retrieving a branch is very slow in these cases. To speed up the large tree operations, I had to create a tree class which store tree data in a flattened tree structure and use tree control just for display purpose.
TiTou
Trusted Enthusiast

I strongly agree with Darren, this is a great idea!


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

StephenB
Active Participant

Agreed with skof. I almost don't want to vote for this unless the tree is also sped up... but I did anyway.

Stephen B
PJM_Labview
Active Participant

> Agreed with skof. I almost don't want to vote for this unless the tree is also sped up... but I did anyway.

 

Exactly



  


vipm.io | jki.net

Freelance_LV
Active Participant

I support this idea too

 

However, i was wondering if it could also be a good idea to read this 'item data' property when an event is detected on the corresponding item tag.

 

i mean, for example, when an event is detected for value change on the tree control, we get the item tag. the problem comes when we have two or more items with the same name, say channels in a group. then the item tags would be like "item tag", 'item tag_1" etc etc. so we end up either havign a list of actual item tags vs tree control item tags, or some such thing.

 

if instead, we also have the item data property vailable in the event node, then, we could the item tag (with any number of post fixes) and the correspondign item data. we could then identify and search for tags with a specific item data.

 

i hope i was able to explain the point.

Regards
Freelance_LV
TestAutomation Consultant