LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to distinguish listbox activities in a single event case

Solved!
Go to solution

Hello, my user interface consists of several list boxes. Now, when I make a double in any of them, I want to copy the selected item to a specific destination. Is there a possibility to create a single doubleclick event for all listboxes? For this I need to distinguish which listbox has been clicked. I would like to prevent generating N event cases for N listboxes.

Regards.

0 Kudos
Message 1 of 3
(1,269 Views)
Solution
Accepted by topic author scr_rhe

Hi scr,

 

in the event case you also get the reference of the control which generated the event: use a property node to read the label of the listbox…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(1,262 Views)
Solution
Accepted by topic author scr_rhe

Since you are only interested in the item, you can index into the items of the listbox by reference. You get the name of the double-clicked element, no matter which listbox. (Same code to handle an unlimited number of listboxes!)

 

 

altenbach_0-1616772299983.png

 

 

 

Message 3 of 3
(1,220 Views)