Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
Cut, Copy, and Paste support
posted

This should be simple, but I am stuck.

I have a SDI application which has a winToolbar which has a menu with cut, copy, and paste (with associated shortcuts).

The interface always has two controls visible at any time.  The control on the right is mostly infragistics textbox controls and a few QWhale editor controls.  The control on the left changes based on user selection, but is also primarly infragistics textbox controls but also includes grid controls, checkboxes, radio buttons, etc.

How do I add cut, copy, and past support for the textbox, grid, and QWhale controls?  When the keyboard is called, the menubar should trap it and I should be able to tell which control made the call (hopefully, though it's not working now), but if the menu item is clicked, how do I determine which control last had the focus (does my main form have to track this with an object)?

FYI, this code did not work:

                    If TypeOf ActiveControl Is TextBoxBase Then
                        CType(ActiveControl, TextBoxBase).Paste()
                    End If

Thanks,

Andrew

Parents
  • 44743
    Verified Answer
    posted

    I tried the code you posted and it worked for me when I had mixed TextBox and UltraTextEditor controls on screen. Alternatively, you can try to call SendKeys.Send("^V"); which will send a Ctrl+V to the window with focus. If you are still having problems, I would recommend contacting the support group: http://www.infragistics.com/gethelp.

Reply Children
No Data