# HG changeset patch # User laurent # Date 1326043435 -3600 # Node ID 8baeb9dff775460e8ff9ec3c4f6cf681a62463bf # Parent 8c4b57808f9c0b8aa274d28dc59bf498400a1fc8 Adding support for using ESC key for closing custom grid cell editors diff -r 8c4b57808f9c -r 8baeb9dff775 controls/DurationCellEditor.py --- a/controls/DurationCellEditor.py Sun Jan 08 18:22:43 2012 +0100 +++ b/controls/DurationCellEditor.py Sun Jan 08 18:23:55 2012 +0100 @@ -94,7 +94,7 @@ def OnDurationChar(self, event): keycode = event.GetKeyCode() - if keycode == wx.WXK_RETURN or keycode == wx.WXK_TAB: + if keycode in [wx.WXK_RETURN, wx.WXK_TAB, wx.WXK_ESCAPE]: self.Parent.Parent.ProcessEvent(event) self.Parent.Parent.SetFocus() else: diff -r 8c4b57808f9c -r 8baeb9dff775 controls/LocationCellEditor.py --- a/controls/LocationCellEditor.py Sun Jan 08 18:22:43 2012 +0100 +++ b/controls/LocationCellEditor.py Sun Jan 08 18:23:55 2012 +0100 @@ -100,7 +100,7 @@ def OnLocationChar(self, event): keycode = event.GetKeyCode() - if keycode == wx.WXK_RETURN or keycode == wx.WXK_TAB: + if keycode in [wx.WXK_RETURN, wx.WXK_TAB, wx.WXK_ESCAPE]: self.Parent.Parent.ProcessEvent(event) self.Parent.Parent.SetFocus() else: