Umashanthi
2 Aug 2010, 6:26 AM
Hi,
I have a Grid widget and I have added a listener to show a Window pop-up when clicked on it. In that pop-up window (first window) I have another Grid and which also shows a pop-up Window when clicked on a cell. I am using the Window widget for both the pop-ups.
I used the following line of code to enable the Window widget to close when the ESC key is pressed.
window.setOnEsc(true);
I set this property for both the Window widgets. But when I get the first window poped-up and when I press the ESC key, the widow doesn't get closed. After I click on the grid on the first window and get the second window pop-up, when I press the ESC key, the first window get closed, but not the second window.
Is the method I mentioned above the right method to enable window closing on ESC key?
If so, any clues why this happens the way I mentioned above?
If not could you please suggest me the right way of doing it?
Thanks in advance,
Umashanthi
I have a Grid widget and I have added a listener to show a Window pop-up when clicked on it. In that pop-up window (first window) I have another Grid and which also shows a pop-up Window when clicked on a cell. I am using the Window widget for both the pop-ups.
I used the following line of code to enable the Window widget to close when the ESC key is pressed.
window.setOnEsc(true);
I set this property for both the Window widgets. But when I get the first window poped-up and when I press the ESC key, the widow doesn't get closed. After I click on the grid on the first window and get the second window pop-up, when I press the ESC key, the first window get closed, but not the second window.
Is the method I mentioned above the right method to enable window closing on ESC key?
If so, any clues why this happens the way I mentioned above?
If not could you please suggest me the right way of doing it?
Thanks in advance,
Umashanthi