LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disallow "paste" for an input string

Solved!
Go to solution

Hi,

 

How can I disallow the "paste" function in an input string?

 

I am using Labview 8.5.1.

 

Thanks.

0 Kudos
Message 1 of 8
(2,740 Views)

Hi tantan,

 

- disallow shortcut menus for your control

- catch/filter keypress events of Ctrl-V

 

P.S.: And don't create double posts for the same topic! Keep all information in one place!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(2,733 Views)

Hi GerdW,

 

Thanks for your feedback. Sorry I can't delete the first post previously before I send out the second post.

 

For the catch/filter keypress events of Ctrl-V. Can elaborate more about it? Where should I start?

 

Thanks.

 

 

0 Kudos
Message 3 of 8
(2,724 Views)

Hi TanTan,

 

to check keypress events you should (obviously) start with an event structure! 😉

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(2,714 Views)

You have to capture the key pressed and discard that if it is a combination of Ctrl and V. Check the attached vi.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 5 of 8
(2,713 Views)
Solution
Accepted by TanTan

Example converted here:http://forums.ni.com/t5/Version-Conversion/Version-9-to-8-5-1/m-p/2267914#U2267914.

 

In that thread, I also gave an example without using the keyboard input reference.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 8
(2,683 Views)

Hi Crossrulz,

 

Thanks for your simple example, it has solved my problem!

0 Kudos
Message 7 of 8
(2,641 Views)

I prefer to remove a menu item instead of simply ignoring a seemingly allowed item.

 

RemovePasteMenuItem.png

Message 8 of 8
(2,638 Views)