]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/GridCustEditor.py
Allow Save Settings to save even when AutoSave is turned off
[wxWidgets.git] / wxPython / demo / GridCustEditor.py
index 06040b31ea91c0bb5474414cae7e964485db42d8..444152cc4f143ea7715232941b1a07fa5c9efd70 100644 (file)
@@ -8,7 +8,7 @@ import  wx.grid as gridlib
 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.
 
@@ -125,9 +125,10 @@ class MyCellEditor(gridlib.PyGridCellEditor):
         """
         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)
 
@@ -149,8 +150,6 @@ class MyCellEditor(gridlib.PyGridCellEditor):
 
         elif key < 256 and key >= 0 and chr(key) in string.printable:
             ch = chr(key)
-            if not evt.ShiftDown():
-                ch = ch.lower()
 
         if ch is not None:
             # For this example, replace the text.  Normally we would append it.