-# 11/6/2003 - Jeff Grimmett (grimmtooth@softhome.net)
-#
-# Modified for wx namespace
-#
import string
class MyCellEditor(gridlib.PyGridCellEditor):
"""
This is a sample GridCellEditor that shows you how to make your own custom
- grid editors. All the methods that can be overridden are show here. The
+ grid editors. All the methods that can be overridden are shown here. The
ones that must be overridden are marked with "*Must Override*" in the
docstring.
Notice that in order to call the base class version of these special
methods we use the method name preceded by "base_". This is because these
- methods are "virtual" in C++ so if we try to call wxGridCellEditor.Create
+ methods are "virtual" in C++ so if we try to call wx.GridCellEditor.Create
for example, then when the wxPython extension module tries to call
ptr->Create(...) then it actually calls the derived class version which
looks up the method in this class and calls it, causing a recursion loop.
"""
self.log.write("MyCellEditor: IsAcceptedKey: %d\n" % (evt.GetKeyCode()))
- ## Oops, there's a bug here, we'll have to do it ourself..
- ##return self.base_IsAcceptedKey(evt)
+ ## We can ask the base class to do it
+ #return self.base_IsAcceptedKey(evt)
+ # or do it ourselves
return (not (evt.ControlDown() or evt.AltDown()) and
evt.GetKeyCode() != wx.WXK_SHIFT)