Sebastian Kr?mling
Guest
|
Hi,
i have the following situation: a term is entered into the adxRibbonEditBox and then the user shall start an action by clicking the search button or hit enter. How do i can obtain any key events from the edit box?
The Change-Event does not fit because it fires when the edit box lost its focus. The Shortcut component doesn't seem to work either though it didn't fire any events when i hit enter in the edit box.
best regards,
Sebastian |
|
Andrei Smolin
Add-in Express team
Posts: 18793
Joined: 2006-05-11
|
Hello Sebastian,
Sebastian Kr?mling writes:
The Change-Event does not fit because it fires when the edit box lost its focus.
What is the problem with the event firing after the focus is lost?
Andrei Smolin
Add-in Express Team Leader |
|
Sebastian Kr?mling
Guest
|
Hi,
that's why I explained the workflow. Losing focus by selecting another control/text/whatever isn't the same as hit enter to start a search/action. As far as I can see, i cannot distinguish what happend when the Change-event fire and when i implement the start of the search in that change-event it will be fired even when the user did something else and didn't hit enter.
Best regards,
Sebastian |
|
Andrei Smolin
Add-in Express team
Posts: 18793
Joined: 2006-05-11
|
Sebastian,
There's no ready-made solution for this task. I suggest that you use Windows API to research if it is possible to get a solution.
To accept the user input to a Ribbon edit box, the Ribbon creates a standard edit box window when required. If you set up a Windows keyboard hook intercepting {Enter}, you will get the handle (call the GetFocus Windows API function) of the window, which generated the event. Then you can use UI Automation or Active Accessibility to find more info about this window.
Andrei Smolin
Add-in Express Team Leader |
|