在GWT中单击ESCAPE(ESC)时关闭Dialogbox


0 Answers

@Override
 public boolean onKeyDownPreview(char key, int modifiers) {
     switch (key) {
       case KeyCodes.KEY_ESCAPE:
         hide();
         break;
     }

     return true;
 }
Question

如何在对话框中添加类似addCloseHandler的内容,单击ESC键时关闭?






Related