]> git.saurik.com Git - wxWidgets.git/commitdiff
More tweaks and fixes
authorRobin Dunn <robin@alldunn.com>
Tue, 10 Aug 2004 01:36:45 +0000 (01:36 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 10 Aug 2004 01:36:45 +0000 (01:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/LayoutAnchors.py
wxPython/demo/ListBox.py
wxPython/demo/Notebook.py
wxPython/demo/PyPlot.py
wxPython/demo/Threads.py

index 188cdd2f5bd6d20e05bf8f65b571852d72e2c6d1..a15f34f6c1d19f1bf417a605b688fff8f52bf138 100644 (file)
@@ -172,15 +172,28 @@ class AnchorsDemoFrame(wx.Frame):
     def OnOkButtonButton(self, event):
         self.Close()
 
-#----------------------------------------------------------------------
+#---------------------------------------------------------------------------
+
+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 LayoutAnchors sample", (50,50))
+        self.Bind(wx.EVT_BUTTON, self.OnButton, b)
 
-def runTest(frame, nb, log):
-    win = AnchorsDemoFrame(frame)
-    frame.otherWin = win
-    win.Show(True)
 
+    def OnButton(self, evt):
+        win = AnchorsDemoFrame(self)
+        win.Show(True)
 
 
+#---------------------------------------------------------------------------
+
+
+def runTest(frame, nb, log):
+    win = TestPanel(nb, log)
+    return win
 
 #----------------------------------------------------------------------
 
index 8ae15a76d6e944c53ab6289903dbcab5ae40402a..357a2b4b21c73dfedfba70c1e65dbb7120afd6e7 100644 (file)
@@ -76,7 +76,7 @@ class TestListBox(wx.Panel):
 
         wx.StaticText(self, -1, "This example uses the wx.ListBox control.", (45, 10))
         wx.StaticText(self, -1, "Select one:", (15, 50), (65, 18))
-        self.lb1 = wx.ListBox(self, 60, (80, 50), (80, 120), sampleList, wx.LB_SINGLE)
+        self.lb1 = wx.ListBox(self, 60, (80, 50), (90, 120), sampleList, wx.LB_SINGLE)
         self.Bind(wx.EVT_LISTBOX, self.EvtListBox, self.lb1)
         self.Bind(wx.EVT_LISTBOX_DCLICK, self.EvtListBoxDClick, self.lb1)
         self.lb1.Bind(wx.EVT_RIGHT_UP, self.EvtRightButton)
@@ -86,7 +86,7 @@ class TestListBox(wx.Panel):
 
 
         wx.StaticText(self, -1, "Select many:", (200, 50), (65, 18))
-        self.lb2 = wx.ListBox(self, 70, (300, 50), (80, 120), sampleList, wx.LB_EXTENDED)
+        self.lb2 = wx.ListBox(self, 70, (300, 50), (90, 120), sampleList, wx.LB_EXTENDED)
         self.Bind(wx.EVT_LISTBOX, self.EvtMultiListBox, self.lb2)
         self.lb2.Bind(wx.EVT_RIGHT_UP, self.EvtRightButton)
         self.lb2.SetSelection(0)
@@ -96,7 +96,7 @@ class TestListBox(wx.Panel):
                                    'test abcd' ]
         sampleList.sort()
         wx.StaticText(self, -1, "Find Prefix:", (15, 250))
-        fp = FindPrefixListBox(self, -1, (80, 250), (80, 120), sampleList, wx.LB_SINGLE)
+        fp = FindPrefixListBox(self, -1, (80, 250), (90, 120), sampleList, wx.LB_SINGLE)
         fp.SetSelection(0)
 
 
index 9637ba95fae62dc07ce9a01370d0c0de60e4f757..3f369001f3a121a608d1302c1aaa86466cd2f058 100644 (file)
@@ -13,7 +13,8 @@ import  images
 
 class TestNB(wx.Notebook):
     def __init__(self, parent, id, log):
-        wx.Notebook.__init__(self, parent, id, size=(21,21), style=
+        wx.Notebook.__init__(self, parent, id, size=(21,21),
+                             #style=
                              #wx.NB_TOP # | wx.NB_MULTILINE
                              #wx.NB_BOTTOM
                              #wx.NB_LEFT
index 2281057b76f3e6ba90dee11d00a30d19d9c12637..f916dc66155bff6110aba1dd468628b262f34836 100644 (file)
@@ -13,14 +13,28 @@ import  wx.lib.plot
 # the file, as expected.                                        |
 ################################################################/
 
-#----------------------------------------------------------------------
+#---------------------------------------------------------------------------
+
+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 PyPlot sample", (50,50))
+        self.Bind(wx.EVT_BUTTON, self.OnButton, b)
+
+
+    def OnButton(self, evt):
+        win = wx.lib.plot.TestFrame(self, -1, "PlotCanvas Demo")
+        win.Show()
+
+#---------------------------------------------------------------------------
+
 
 def runTest(frame, nb, log):
-    # Loading the demo class directly from the library's
-    # test code.
-    win = wx.lib.plot.TestFrame(nb, -1, "PlotCanvas Demo")
-    frame.otherWin = win
-    return None
+    win = TestPanel(nb, log)
+    return win
+
 
 #----------------------------------------------------------------------
 
index 8e64bf83476ad597c37f96be0216c0920d013b83..07910dc4d75fabebba3a18b8ad12d841414cc61e 100644 (file)
@@ -224,7 +224,7 @@ class TestPanel(wx.Panel):
 
 
     def OnButton(self, evt):
-        win = TestFrame(frame, log)
+        win = TestFrame(self, self.log)
         win.Show(True)