Close Dialog when user presses Escape

Answered
0
0

I have a form which I want to be able to close by pressing Escape. I’ve added a button to do the close and set the CancelButton on the form to be that button.

Am I missing something?

  • You must to post comments
Best Answer
0
0

Hi Neil,
I just tried with a small sample and it seems to work fine. Can you try this?
TIA,
Levie

  • Neil Hoskins
    This works fine, but I’ve set things on my form exactly the same and it’s not working. The form is displaying a PDF document in a Frame – could that have something to do with it?
  • Levie (ITG)
    Hi Neil, I just tested it with an iFrame and PdfViewer and both worked ok. Can you please attach a small sample so we can look at it? Thanks, Levie
  • Neil Hoskins
    It was that – no other controls could get Focus and I think the PDF Viewer was trapping the Escape key. I moved a normal button to the RibbonBar I had on that form and it now works fine. Thanks Levie.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.