Maybe others with more GWT Form experience can chime in, but adding a KeyboardListener to your text boxes to do a form submit seems completely reasonable and non-hacky. In fact, it's completely in line with traditional UI paradigms, where the whole form submit() concept and all is what's really unusual. Another idea is to extend the FormPanel to something like MyCoolFormPanel and add your own .setDefaultButton method on it. Simply my random thoughts. Good luck!
Later, Shaffer On Dec 11, 2:06 pm, UVic_Paul <paul.e.st...@gmail.com> wrote: > Hey all, > > Been searching around without success, so time to ask the group.... > > How do you (or can you) set the default button on a "form"? > > For example, let's say you have a panel with 4 TextBox widgets, an > "Enter" button, and a "Cancel" button. When the user presses "Enter" > during input of any of the 4 Text Boxes, I want to act as if the > "Enter" button had been clicked. > > In Swing, you'd do something like: > JRootPane rootPane = frame.getRootPane(); > rootPane.setDefaultButton(enterButton); > > I realize I can create a KeyboardListener, attach it to all 4 Text > Boxes, and react when "Enter" is pressed, but that seems like a bit of > a hack to me. > > thanks in advance, > Paul --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---