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
510
How to fire event EditorButtonClick by Keyboard?
posted

 Hi all,

I use ButtonRight to do something, I like this. But some problem: I must use mouse to click EditorButton and can not use keyboard. Please show me how can I press any key (F9, F10...)  to fire (raise event) EditorButtonClick?

Thanks in advance!

  • 469350
    Offline posted

    You cannot. But there's really no need to. The way to do something like this is to move the code from the event handler into a method. Then call that method from the event handler and from anywhere else you like, such as the KeyPress event.