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
250
Set ButtonTool as Default Button on Enter
posted

Hi

I have a ButtonTool inside a Ribbon control defined inside a ribbongroup. I want to set the button as default button when a user hits enter button on the window/texboxes present in it. The IsDefault property that is available in normal Button is not available in Button Tool. Can you suggest me a solution ?

Thanks

Eldin

Parents
No Data
Reply
  • 34510
    Offline posted

    Hi Eldin,

    For this I'd imagine you could use the PreviewKeyDown event on the window itself to know when the user has pressed the Enter key and then use the RaiseEvent method to fire the ButtonTool's Click event.  I'm putting together a sample to test this but it should meet your requirements.  I'll have an update for you by Thursday.

Children