you can override the PopupPanel#onKeydownPreview method like below;

    @Override
    public boolean onKeyDownPreview(char key, int modifiers) {
        // Use the popup's key preview hooks to close the dialog when either
        // enter or escape is pressed.
        switch (key) {
        case KeyboardListener.KEY_ENTER:
        case KeyboardListener.KEY_ESCAPE:
            hide();
            break;
        }

        return true;
    }


Hasan...
http://www.jroller.com/hasant


On Thu, Jan 15, 2009 at 11:17 AM, aragorn <sagar5...@gmail.com> wrote:

>
> My application displays a popup whenevr a particular button is
> clicked. Now i can hide the popup whenever the user clicks the mouse
> outside of it using the default popup-panel property provided by GWT.
> Apart from that I also need to listen to keyboard so that if the user
> hits ESC on the keyboard my popup should disappear from the screen.
> Any idea how to implement in gwt?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to