LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CTRL+V works fine with "Key Down?" event in , but not when the VI is inserted into a SubPanel — any ideas?

Solved!
Go to solution

Hi everyone,

I'm working on a VI where I use the "Key Down?" event to detect user input, specifically to validate a String Control. The idea is to analyze every key the user presses, and also inspect the full string after a CTRL+V paste operation.

Everything works as expected when the VI runs standalone (i.e., in the context). However, when I insert the same VI into a SubPanel, the paste operation doesn't seem to trigger the event — it's like the "Key Down?" event isn't firing at all.

Has anyone encountered this behavior before? Is there a workaround to make CTRL+V detection work inside a SubPanel?

Thanks in advance!

 

CarPA_0-1759131835676.png 

CarPA_1-1759133495219.png

 

 

0 Kudos
Message 1 of 3
(266 Views)
Solution
Accepted by CarPA

From Using Events with Subpanel Controls

If you configure a VI to handle an event and then configure the VI you load into a subpanel control to handle the same event, the top-level VI containing the subpanel control handles the event.

 

Bob Schor shared some workaround in Key Down Events in sub-Panel? 

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
0 Kudos
Message 2 of 3
(243 Views)
Solution
Accepted by CarPA

It is also possible to capture keys pressed on keyboard without event. It works on sub panels and also in vi's that are not in front :

Walker34_0-1759159467318.png

 

Message 3 of 3
(192 Views)