X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..78901ea99c705160f7ec8e882e42c4c04896bec2:/wxPython/demo/wxGrid.py?ds=sidebyside diff --git a/wxPython/demo/wxGrid.py b/wxPython/demo/wxGrid.py index 1e3b81606d..676be13eb5 100644 --- a/wxPython/demo/wxGrid.py +++ b/wxPython/demo/wxGrid.py @@ -4,11 +4,14 @@ from wxPython.wx import * #--------------------------------------------------------------------------- buttonDefs = { - 814 : ('GridSimple', 'Simple wxGrid, catching all events'), - 815 : ('GridStdEdRend', 'wxGrid showing Editors and Renderers'), - 818 : ('GridHugeTable', 'A wxGrid with a HUGE table (100 MILLION cells!)'), - 817 : ('GridCustTable', 'wxGrid using a custom Table, with non-string data'), - 819 : ('GridEnterHandler', 'Remapping keys to behave differently'), + 814 : ('GridSimple', ' Simple wxGrid, catching all events '), + 815 : ('GridStdEdRend', ' wxGrid showing Editors and Renderers '), + 818 : ('GridHugeTable', ' A wxGrid with a HUGE table (100 MILLION cells!) '), + 817 : ('GridCustTable', ' wxGrid using a custom Table, with non-string data '), + 819 : ('GridEnterHandler',' Remapping keys to behave differently '), + 820 : ('GridCustEditor', ' Shows how to create a custom Cell Editor '), + 821 : ('GridDragable', ' A wxGrid with dragable rows and columns '), + 822 : ('GridDragAndDrop', 'Shows how to make a grid a drop target for files'), } @@ -24,18 +27,18 @@ class ButtonPanel(wxPanel): for k in keys: text = buttonDefs[k][1] btn = wxButton(self, k, text) - box.Add(btn, 0, wxALIGN_CENTER|wxALL, 15) + box.Add(btn, 0, wxALIGN_CENTER|wxALL, 10) EVT_BUTTON(self, k, self.OnButton) - self.SetAutoLayout(true) + self.SetAutoLayout(True) self.SetSizer(box) def OnButton(self, evt): modName = buttonDefs[evt.GetId()][0] module = __import__(modName) - frame = module.TestFrame(self, self.log) - frame.Show(true) + frame = module.TestFrame(None, self.log) + frame.Show(True) #--------------------------------------------------------------------------- @@ -92,9 +95,14 @@ changes how the ENTER key works, moving the current cell left to right and wrapping around to the next row when needed.
-You can also look at the SWIG interface -file used to generate the grid module for a lot more clues as to -how things work. """ + + + +if __name__ == '__main__': + import sys,os + import run + run.main(['', os.path.basename(sys.argv[0])]) +