X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c6281ceb776325251aa119c7b496e6152303996a..299647acac7960652aadb008775429c1f8ea9b8d:/wxPython/demo/wxGrid.py diff --git a/wxPython/demo/wxGrid.py b/wxPython/demo/wxGrid.py deleted file mode 100644 index 78eae6b678..0000000000 --- a/wxPython/demo/wxGrid.py +++ /dev/null @@ -1,104 +0,0 @@ -# 11/18/2003 - Jeff Grimmett (grimmtooth@softhome.net) -# -# o Updated for wx namespace -# - -import wx - -#--------------------------------------------------------------------------- - -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 '), - 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'), - } - - -class ButtonPanel(wx.Panel): - def __init__(self, parent, log): - wx.Panel.__init__(self, parent, -1) - self.log = log - - box = wx.BoxSizer(wx.VERTICAL) - box.Add((20, 20)) - keys = buttonDefs.keys() - keys.sort() - - for k in keys: - text = buttonDefs[k][1] - btn = wx.Button(self, k, text) - box.Add(btn, 0, wx.ALIGN_CENTER|wx.ALL, 10) - self.Bind(wx.EVT_BUTTON, self.OnButton, btn) - - self.SetAutoLayout(True) - self.SetSizer(box) - - - def OnButton(self, evt): - modName = buttonDefs[evt.GetId()][0] - module = __import__(modName) - frame = module.TestFrame(None, self.log) - frame.Show(True) - - -#--------------------------------------------------------------------------- - -def runTest(frame, nb, log): - win = ButtonPanel(nb, log) - return win - -#--------------------------------------------------------------------------- - - - -overview = """\ - -

wxGrid

- -This demo shows various ways of using the new and -improved wxGrid class. Unfortunatly it has not been -documented yet, and while it is somewhat backwards compatible, if you -try to go by the current wxGrid documentation you will probably just -confuse yourself. -

-You can look at the sources for these samples to learn a lot about how -the new classes work. -

    -
  1. GridSimple.py A simple grid that shows -how to catch all the various events. - -

    -

  2. GridStdEdRend.py A grid that -uses non-default Cell Editors and Cell Renderers. - -

    -

  3. GridHugeTable.py A grid that -uses a non-default Grid Table. This table is read-only and simply -generates on the fly a unique string for each cell. - -

    -

  4. GridCustTable.py This grid -shows how to deal with tables that have non-string data, and how Cell -Editors and Cell Renderers are automatically chosen based on the data -type. - -

    -

  5. GridEnterHandler.pyThis one -changes how the ENTER key works, moving the current cell left to right -and wrapping around to the next row when needed. -
-

- -""" - - -if __name__ == '__main__': - import sys,os - import run - run.main(['', os.path.basename(sys.argv[0])]) -