X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1005198c07b2227bd6736edf1a4f2d0a8909fdfd..15dd11365ed337fd18cf97ec860d7e17546a5bd4:/wxPython/demo/GridBagSizer.py?ds=sidebyside

diff --git a/wxPython/demo/GridBagSizer.py b/wxPython/demo/GridBagSizer.py
index 8bf5807446..c6a223782c 100644
--- a/wxPython/demo/GridBagSizer.py
+++ b/wxPython/demo/GridBagSizer.py
@@ -117,12 +117,29 @@ assert when compiled in debug mode.""",
             print "item found: ", `item.GetPos()`, "--", `item.GetSpan()`
 
         
-#----------------------------------------------------------------------
+#---------------------------------------------------------------------------
+
+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 GridBagSizer sample", (50,50))
+        self.Bind(wx.EVT_BUTTON, self.OnButton, b)
+
+
+    def OnButton(self, evt):
+        win = TestFrame()
+        win.Show(True)
+
+
+
+#---------------------------------------------------------------------------
+
 
 def runTest(frame, nb, log):
-    win = TestFrame()
-    frame.otherWin = win
-    win.Show(True)
+    win = TestPanel(nb, log)
+    return win
 
 
 #----------------------------------------------------------------------