X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e4a197e4c60e461b8068b0619692ea083e30b8b..20c84410479ba60b03289608a5e6893f2936133d:/wxPython/demo/GridSimple.py diff --git a/wxPython/demo/GridSimple.py b/wxPython/demo/GridSimple.py index 89c2ec6e07..9075341a70 100644 --- a/wxPython/demo/GridSimple.py +++ b/wxPython/demo/GridSimple.py @@ -36,6 +36,8 @@ class SimpleGrid(wxGrid): ##, wxGridAutoEditMixin): self.SetCellValue(6, 3, "You can veto editing this cell") + #self.SetRowLabelSize(0) + #self.SetColLabelSize(0) # attribute objects let you keep a set of formatting values # in one spot, and reuse them if needed @@ -64,6 +66,11 @@ class SimpleGrid(wxGrid): ##, wxGridAutoEditMixin): self.SetCellValue(11, 1, "This cell is set to span 3 rows and 3 columns"); + editor = wxGridCellTextEditor() + editor.SetParameters('10') + self.SetCellEditor(0, 4, editor) + self.SetCellValue(0, 4, "Limited text") + # test all the events EVT_GRID_CELL_LEFT_CLICK(self, self.OnCellLeftClick) @@ -153,7 +160,7 @@ class SimpleGrid(wxGrid): ##, wxGridAutoEditMixin): # Show how to stay in a cell that has bad data. We can't just # call SetGridCursor here since we are nested inside one so it - # won't have any effect. Instead, set coordinants to move to in + # won't have any effect. Instead, set coordinates to move to in # idle time. value = self.GetCellValue(evt.GetRow(), evt.GetCol()) if value == 'no good':