- EVT_GRID_LABEL_LEFT_CLICK(self, self.OnLabelLeftClick)
- EVT_GRID_LABEL_RIGHT_CLICK(self, self.OnLabelRightClick)
- EVT_GRID_LABEL_LEFT_DCLICK(self, self.OnLabelLeftDClick)
- EVT_GRID_LABEL_RIGHT_DCLICK(self, self.OnLabelRightDClick)
+ editor = gridlib.GridCellTextEditor()
+ editor.SetParameters('10')
+ self.SetCellEditor(0, 4, editor)
+ self.SetCellValue(0, 4, "Limited text")
+
+ renderer = gridlib.GridCellAutoWrapStringRenderer()
+ self.SetCellRenderer(15,0, renderer)
+ self.SetCellValue(15,0, "The text in this cell will be rendered with word-wrapping")
+
+
+ # test all the events
+ self.Bind(gridlib.EVT_GRID_CELL_LEFT_CLICK, self.OnCellLeftClick)
+ self.Bind(gridlib.EVT_GRID_CELL_RIGHT_CLICK, self.OnCellRightClick)
+ self.Bind(gridlib.EVT_GRID_CELL_LEFT_DCLICK, self.OnCellLeftDClick)
+ self.Bind(gridlib.EVT_GRID_CELL_RIGHT_DCLICK, self.OnCellRightDClick)