General XMetaL Discussion
authr March 26, 2009 at 11:52 pm
overriding paste functionality for Edit (menu) > PasteMarch 26, 2009 at 11:52 pmParticipants 1Replies 2Last Activity 13 years, 8 months ago
Can somebody please specify how to overwrite the functionality for the paste command available from
Menu Edit-> Paste, XMetal Standard Toolbar button and from Right Mouse Context Menu
I have gone through the post on overriding the File menu ->open command but the same process doesnt work for Edit-> Paste and remaining of the above ,but i can overwrite the Ctrl+V shortcut functionality by following the process specified in post for Open Button overriding
Am i missing something ?
Thank youDerek Read March 27, 2009 at 12:29 am
Reply to: overriding paste functionality for Edit (menu) > PasteMarch 27, 2009 at 12:29 am
(note that this was originally part of another topic, but did not fit, so I've split it off and created this new one here)Derek Read March 27, 2009 at 11:30 pm
Reply to: overriding paste functionality for Edit (menu) > PasteMarch 27, 2009 at 11:30 pm
Assigning the Ctrl+V shortcut does not affect menu items or toolbar buttons (if you wanted to replace that functionality you'd need to add a new menu item or toolbar button, and then optionally remove the existing ones).
What you want to do is best accomplished using one of these event macros:
Here's an example that changes any text you paste to uppercase for a particular document type:
Application.Alert(“Changing text to UPPERCASE…”);[/code]
Application.Clipboard.Text = Application.Clipboard.Text.toUpperCase();
The Programmer's Guide topic “When text is dropped” documents these events (and more).
- You must be logged in to reply to this topic.