From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

detect on tree whether expand/collapse icon is clicked

Is it possible to detect, whether user clicks on the +- Icons to expand/collapse tree items?

0 Kudos
Message 1 of 4
(2,429 Views)
0 Kudos
Message 2 of 4
(2,412 Views)

With an event structure you can capture Item open & close events.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 4
(2,408 Views)

You can also just use a 'Mouse Up' (or Down) event. This will generate the coordinates of where you clicked. There is an Invoke Node that then turns this into the name of the item checked. 

See my attached code that decides if a clicked item is expandable and if it isn't it changes the icon.

—Ben
Prevent your computer from sleeping programmatically!
Use Power Requests
Download from GitHub

0 Kudos
Message 4 of 4
(2,407 Views)