PDA

View Full Version : [CLOSED] Remove Key Esc to close Window



osef
Feb 19, 2014, 6:41 PM
Hi, How Can I do to remove the event to close a ext:Window with the key escape?

Thank you

geoffrey.mcgill
Feb 19, 2014, 7:02 PM
You can override the functionality of the Esc key by setting the .OnEsc property of Window with "Ext.emptyFn".

http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.window.Window-cfg-onEsc

But, I discovered a problem with how that value is rendered. I have committed the fix to Svn. This fix will be available in the upcoming Ext.NET 2.5 release.

You can work-around the problem by setting the following "XOnEsc" property on your <ext:Window> component.


<ext:Window runat="server" XOnEsc="Ext.emptyFn" />

If you update from Svn, or use the Ext.NET 2.5 (or newer) release, then you can remove the "X" and just use .OnEsc.

Hope this helps.

osef
Feb 19, 2014, 10:48 PM
You can override the functionality of the Esc key by setting the .OnEsc property of Window with "Ext.emptyFn".

http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.window.Window-cfg-onEsc

But, I discovered a problem with how that value is rendered. I have committed the fix to Svn. This fix will be available in the upcoming Ext.NET 2.5 release.

You can work-around the problem by setting the following "XOnEsc" property on your <ext:Window> component.


<ext:Window runat="server" XOnEsc="Ext.emptyFn" />

If you update from Svn, or use the Ext.NET 2.5 (or newer) release, then you can remove the "X" and just use .OnEsc.

Hope this helps.


Thank you, this is working.