General XMetaL Discussion
XMetaL Community Forum › General XMetaL Discussion › overriding paste functionality for Edit (menu) > Paste
-
authr March 26, 2009 at 11:52 pm
overriding paste functionality for Edit (menu) > Paste
March 26, 2009 at 11:52 pmParticipants 1Replies 2Last Activity 14 years agoHi,
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 you
Derek Read March 27, 2009 at 12:29 am
Reply to: overriding paste functionality for Edit (menu) > Paste
March 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) > Paste
March 27, 2009 at 11:30 pmAssigning 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:
- On_Document_Before_DropText
- On_Application_Document_Before_DropText.
Here's an example that changes any text you paste to uppercase for a particular document type:
[code]
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).
-
AuthorPosts
- You must be logged in to reply to this topic.