X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d7403ad2d154a8e2974fdc5fc215258f3a75cdde..42f8298f6f42d5d63bb3caf65682b7d9d9f8b702:/wxPython/demo/Grid_MegaExample.py diff --git a/wxPython/demo/Grid_MegaExample.py b/wxPython/demo/Grid_MegaExample.py index 4eafd68ab2..acb41434f1 100644 --- a/wxPython/demo/Grid_MegaExample.py +++ b/wxPython/demo/Grid_MegaExample.py @@ -4,6 +4,8 @@ import wx.grid as Grid import images +#--------------------------------------------------------------------------- + class MegaTable(Grid.PyGridTableBase): """ A custom wx.Grid Table using user supplied data @@ -444,10 +446,25 @@ class TestFrame(wx.Frame): #--------------------------------------------------------------------------- +class TestPanel(wx.Panel): + def __init__(self, parent, log): + self.log = log + wx.Panel.__init__(self, parent, -1) + + b = wx.Button(self, -1, "Show the MegaGrid", (50,50)) + self.Bind(wx.EVT_BUTTON, self.OnButton, b) + + + def OnButton(self, evt): + win = TestFrame(self) + win.Show(True) + +#--------------------------------------------------------------------------- + + def runTest(frame, nb, log): - win = TestFrame(frame) - frame.otherWin = win - win.Show(True) + win = TestPanel(nb, log) + return win