--- a/VariablePanel.py Thu Oct 08 16:39:08 2009 +0200
+++ b/VariablePanel.py Thu Oct 08 16:40:08 2009 +0200
@@ -880,7 +880,8 @@
# create location text control
self.Location = wx.TextCtrl(id=-1, name='Location', parent=self,
- pos=wx.Point(0, 0), size=wx.Size(0, 0), style=0)
+ pos=wx.Point(0, 0), size=wx.Size(0, 0), style=wx.TE_PROCESS_ENTER)
+ self.Location.Bind(wx.EVT_KEY_DOWN, self.OnLocationChar)
# create browse button
self.BrowseButton = wx.Button(id=-1, label='...',
@@ -926,6 +927,14 @@
self.Location.SetFocus()
+ def OnLocationChar(self, event):
+ keycode = event.GetKeyCode()
+ if keycode == wx.WXK_RETURN or keycode == wx.WXK_TAB:
+ self.Parent.Parent.ProcessEvent(event)
+ self.Parent.Parent.SetFocus()
+ else:
+ event.Skip()
+
def SetInsertionPoint(self, i):
self.Location.SetInsertionPoint(i)
@@ -940,7 +949,10 @@
wx.grid.PyGridCellEditor.__init__(self)
self.Table = table
self.Controler = controler
-
+
+ def __del__(self):
+ self.CellControl = None
+
def Create(self, parent, id, evt_handler):
locations = self.Controler.GetVariableLocationTree()
if len(locations) > 0: