X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/83625579234e2dfd760c7380d267f0f0c1e53be6..9cf99fc093f9c45b6b5d8d8b357699d826c9916a:/wxPython/demo/GridCustEditor.py diff --git a/wxPython/demo/GridCustEditor.py b/wxPython/demo/GridCustEditor.py index f90ea1f2f5..8f9ed931e4 100644 --- a/wxPython/demo/GridCustEditor.py +++ b/wxPython/demo/GridCustEditor.py @@ -46,7 +46,8 @@ class MyCellEditor(wxPyGridCellEditor): PaintBackground and do something meaningful there. """ self.log.write("MyCellEditor: SetSize %s\n" % rect) - self._tc.SetDimensions(rect.x, rect.y, rect.width+2, rect.height+2) + self._tc.SetDimensions(rect.x, rect.y, rect.width+2, rect.height+2, + wxSIZE_ALLOW_MINUS_ONE) def Show(self, show, attr): @@ -124,7 +125,8 @@ class MyCellEditor(wxPyGridCellEditor): ## Oops, there's a bug here, we'll have to do it ourself.. ##return self.base_IsAcceptedKey(evt) - return not evt.HasModifiers() and evt.GetKeyCode() != WXK_SHIFT + return (not (evt.ControlDown() or evt.AltDown()) and + evt.GetKeyCode() != WXK_SHIFT) def StartingKey(self, evt): @@ -210,6 +212,7 @@ class GridEditorTest(wxGrid): self.SetColSize(1, 150) self.SetColSize(2, 150) + #--------------------------------------------------------------------------- class TestFrame(wxFrame):