ramnathlikesu
8 Sep 2011, 10:05 AM
Hi,
I have requirement to capture the Enter key of Keyboard and fire the GXT Dialog OK Button.
Below is the code i have written.
Dialog
private class SubmitListener extends KeyboardListenerAdapter {
public void onKeyPress(Widget sender, char key, int mods) {
if (KeyboardListener.KEY_ENTER == key)
button.click();
}
Every time i need to add this Listener to the GXT Dialog. In my application, GXT Dialog is used lot of times. I need this functionality to be applied for total application.
I didn't got any idea how to apply this functionality to all Dialogue in my application.
Request you to please help me in this.
Thank you...
Regards,
Ramnath R
}
I have requirement to capture the Enter key of Keyboard and fire the GXT Dialog OK Button.
Below is the code i have written.
Dialog
private class SubmitListener extends KeyboardListenerAdapter {
public void onKeyPress(Widget sender, char key, int mods) {
if (KeyboardListener.KEY_ENTER == key)
button.click();
}
Every time i need to add this Listener to the GXT Dialog. In my application, GXT Dialog is used lot of times. I need this functionality to be applied for total application.
I didn't got any idea how to apply this functionality to all Dialogue in my application.
Request you to please help me in this.
Thank you...
Regards,
Ramnath R
}