]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/GridSimple.py
The great wxVScrolledWindow refactoring: allow using it both horizontal and
[wxWidgets.git] / wxPython / demo / GridSimple.py
index e289ee0f55028ac904272814a504b7412d92cd95..26a19c59e491e5ad8c9643f556dc70882fcfd369 100644 (file)
@@ -72,7 +72,11 @@ class SimpleGrid(gridlib.Grid): ##, mixins.GridAutoEditMixin):
         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)
@@ -230,7 +234,7 @@ class SimpleGrid(gridlib.Grid): ##, mixins.GridAutoEditMixin):
 class TestFrame(wx.Frame):
     def __init__(self, parent, log):
         wx.Frame.__init__(self, parent, -1, "Simple Grid Demo", size=(640,480))
-        grid = SimpleGrid(self, log)
+        self.grid = SimpleGrid(self, log)
 
 
 
@@ -238,9 +242,13 @@ class TestFrame(wx.Frame):
 
 if __name__ == '__main__':
     import sys
-    app = wx.PySimpleApp()
+    from wx.lib.mixins.inspection import InspectableApp
+    app = InspectableApp(False)
     frame = TestFrame(None, sys.stdout)
     frame.Show(True)
+    #import wx.py
+    #shell = wx.py.shell.ShellFrame(frame, locals={'wx':wx, 'frame':frame})
+    #shell.Show()
     app.MainLoop()