Hi all,
Hoping somebody will have a cunning way to prevent anything from happening when a user presses Ctr+V in a field and maybe also the right-click context menu paste too.
Guessing it will having something to do with a key press message but not sure which is the most appropriate to use, any help would be appreciated thanks!
Prevent users from pasting text into a field
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Prevent users from pasting text into a field
Hi Proct0r,
you can add a "dummy" PASTEKEY handler to the field:
Hint:
From the dictionary about "pastekey":
...
Comments:
The LiveCode development environment traps the pasteKey message, unless "Suspend LiveCode UI" is turned on in the Development menu.
This means that the pasteKey message is not received by a stack if it's running in the development environment.
...
Best
Klaus
you can add a "dummy" PASTEKEY handler to the field:
Code: Select all
on pastekey
## NADA!
## If you do not:-> pass pastekey
## then nothing will happen and that's what we want!
end pastekey
From the dictionary about "pastekey":
...
Comments:
The LiveCode development environment traps the pasteKey message, unless "Suspend LiveCode UI" is turned on in the Development menu.
This means that the pasteKey message is not received by a stack if it's running in the development environment.
...
Best
Klaus
Re: Prevent users from pasting text into a field
Awesome, thanks for your help 
