I have a text widget where I want to make enter event to behave like a
tab event. so I capture the Key press event and raise a tab native
event.

However the tab behavior is not reflected in the application. Thee
code for event handler is

public void onKeyPress(KeyPressEvent event) {
                int keyCode = event.getNativeEvent().getKeyCode();

                if (keyCode == KeyCodes.KEY_ENTER) {

                   NativeEvent nativeEvent =
 
Document.get().createKeyPressEvent(false,false,false,false,KeyCodes.KEY_TAB);
                   DomEvent.fireNativeEvent(nativeEvent, this, 
this.getElement());
                }

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

Reply via email to