I'm trying to create a widget that will always enter the current time
whenever the user types 't'. My problem is that the keyboard listener
does not fire the first time the user clicks on the textbox with the
mouse, and then presses a keyboard button. If the textbox is clicked
on a second time, the listener will fire when the user presses
keyboard keys
Below is some sample code that I'm trying. Any help would be greatly
appreciated.
public class Testbox extends TextBox {
public Testbox() {
this.addKeyboardListener(
new KeyboardListenerAdapter(){
public void onKeyDown(Widget sender, char keyCode, int modifiers)
{
GWT.log("pressing a key in testbox", null);
}
}
);}}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---