LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to place check mark boxes near tree items?

I have a tree in my program. I want to place check boxes near the parent items and child items. Also I want to have opportunity to select all child items if I click on parent item's check box.
Can you help?
Thanks
0 Kudos
Message 1 of 10
(6,046 Views)

Hi beeee,

do you mean separate check box controls or do you mean the hierarchy? You can use an invoke node to select the child items if you select a parent node.

 

Mike

Message 2 of 10
(6,037 Views)
I mean the hierarchy. I need check mark boxes near each item of tree (parents and childs). I searched in Invoke node but hadn't found. Can you tell how can I do that?
0 Kudos
Message 3 of 10
(6,028 Views)

Please take a look into "Traverse Tree and Set Custom Symbols.vi". This VI should be included in your example finder, at least if you are working with LV 8.6.

Is this comparable to what you want to do?

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 10
(6,023 Views)
In this example near the tree items are just symbols. I can put a symbol near tree item. But I need a check mark box to have opportunity to control the tree.
0 Kudos
Message 5 of 10
(6,015 Views)

You are very, very lucky that i am currently working on a similar task for my software. Therefore, i can share you my "proof of concept" which still has "minor bugs" (in regard to what i want to have). Nevertheless, i think you can see what its about. Sure, there might be more prudent solutions, so if someone else is willing to provide better approaches, please step in and let us know!

 

hope this helps,

Norbert 

 

PS: Please note that the attachement is LV 8.6.1 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 6 of 10
(5,998 Views)

Update:

Due to some restraints i encountered, it would be very difficult to adopt the behavior of the tree to my needs.

Therefore i think i will create an XControl for my application based on the previously attached example. The reason for this decision is simple: With an XControl, i can bundle visual appearance, data storage and data handling in a single control.

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 7 of 10
(5,990 Views)

To create the effect you want, you basically need to adjust a tree item's symbol programatically, replacing an "unchecked box" symbol with a "checked box" symbol whenever your user clicks on the area of interest. I have attached a VI showing how this is done and here's a screenshot of that VI if you don't have LabVIEW 8.6:

 

 Tree Checkboxes.png

The functionality revolves around a mouse up event (ie when a user lets go of the mouse button) followed by an invoke node of the tree control called "Point To Row Column" - This funciton outputs a boolean informing you whether the click was over a symbol and the tag of the item that was clicked. The tag is then used to select the appropriate item (using the Active Item: Tag property node) and the Active Item: Symbol is used to see what the current symbol is. Once that is done, I simple set the symbol to either checked or unchecked, whichever is opposite to the current status.

 

I hope this helps you,

 

Shaun

 

 

Message 8 of 10
(5,988 Views)

I am really lucky 🙂 Thank you very much.

0 Kudos
Message 9 of 10
(5,975 Views)

Thank you very much 

0 Kudos
Message 10 of 10
(4,902 Views)