Hi all, I am coding a simple text editor, and I want to intercept copy and paste events. I tried deleting the menu item for it, but it still works. By the way, I am using a normal TextArea. If I could make it so that you can only copy and paste within the TextArea, that would also be great.
Create an EditCopy and EditPaste Menu handlers for the screen on which your textArea resides and put any code you like in there, including just returning true to disallow the actions.
You want to copy text to the clipboard? Xojo does that for you. In that case don’t create a menu handler, just let Xojo do it. Or am I still confused about what you want to do.
[quote=59819:@Roger Clary]Create an EditCopy and EditPaste Menu handlers for the screen on which your textArea resides and put any code you like in there, including just returning true to disallow the actions.
[/quote]
If you want to handle the copy/paste menu yourself, you’ll need to subclass the textarea and add menuhandlers to the subclass. Otherwise a window’s handler is only fired if the built-in handler fails… ie no text was selected to copy.