Is there a way to make a button on WebDialog respond to the Enter and/or Return key? In other words If I hit the Enter key it is just as if I hit an OK button.
Seems like this should be easy but I cannot find a clear discussion on the forum or in the docs. Need this to work in both mac and windows browsers.
I tried the KeyPressed event but where does the KeyPressed event go. I tried it in the button and I tried on the WebDialog. The event will not fire. Is there something else I need to do?
@Albin K Thanks, but the problem isn’t the code but when the event fires . From the docs on the KeyPressed event…
So I put the event in every text field on the dialog and it works ok, but only if the cursor is in one of those fields.
I want it to fire regardless of where the cursor is, The only way I can see to do that is to add the KeyPessed event to the WebPage, but then it would be active all the time and the dialog properties would not be in scope.
I have been trying to get it to work in the WebPage Keypressed event. I ony want it to be active while the WebDialog is being shown so I have been trying to add it to the WebDialog Shown, but the KeyPressed event is not available as a property. I thought this would work (SiteDocumentLibrary is the WebPage name)…
@Michel Bujardet For webdialog, you can use a property on the webpage that will serve to display it, and just check in KeyPressed handler that is not nil.
Maybe I don’t understand. Could you explain your suggestion a bit further? How does the property display the WebDialog?
I am displaying vairous WebDialogs at various times in the web app. As an example in the web page open event I am displaying a WebDialog login window.