Right Click Copy and Paste

Posted by: lg_sony_27 on 8 September 2017, 1:25 pm EST

  • Posted 8 September 2017, 1:25 pm EST

    <P>Hi! </P>
    <P>I can use Ctrl C and Ctrl V in the spread already. I would like also to do the same operation by using mouse.</P>
  • Replied 8 September 2017, 1:25 pm EST

    You can set up a ContextMenu with a Copy and Paste button on it and assign it to the spread and then use Spreads ClipboardCopy and ClipboardPaste methods.<br>
  • Replied 8 September 2017, 1:25 pm EST

    <P>this is what i did but its not copying and pasting.</P><FONT size=2>
    <P></FONT><FONT color=#0000ff size=2>Dim</FONT><FONT size=2> custommenu </FONT><FONT color=#0000ff size=2>As</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>New</FONT><FONT size=2> ContextMenu</P>
    <P>custommenu.MenuItems.Add(</FONT><FONT color=#a31515 size=2>"&Copy"</FONT><FONT size=2>)</P>
    <P>custommenu.MenuItems.Add(</FONT><FONT color=#a31515 size=2>"&Paste"</FONT><FONT size=2>)</P>
    <P>FpSpread2.ContextMenu = custommenu</P>
    <P>FpSpread2.ActiveSheet.ClipboardCopy()</P>
    <P>FpSpread2.ActiveSheet.ClipboardPaste()</P></FONT>
  • Replied 8 September 2017, 1:25 pm EST

    You have to add the handlers for the click events for the menu items and put the Clipboard code in those events.<br>
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels