More tweaks and fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-08-10 01:36:45 +00:00
parent 7d0f8766ac
commit 5523df9f4b
5 changed files with 46 additions and 18 deletions

View File

@@ -172,15 +172,28 @@ class AnchorsDemoFrame(wx.Frame):
def OnOkButtonButton(self, event): def OnOkButtonButton(self, event):
self.Close() 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 OnButton(self, evt):
win = AnchorsDemoFrame(self)
win.Show(True)
#---------------------------------------------------------------------------
def runTest(frame, nb, log): def runTest(frame, nb, log):
win = AnchorsDemoFrame(frame) win = TestPanel(nb, log)
frame.otherWin = win return win
win.Show(True)
#---------------------------------------------------------------------- #----------------------------------------------------------------------

View 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, "This example uses the wx.ListBox control.", (45, 10))
wx.StaticText(self, -1, "Select one:", (15, 50), (65, 18)) 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, self.EvtListBox, self.lb1)
self.Bind(wx.EVT_LISTBOX_DCLICK, self.EvtListBoxDClick, self.lb1) self.Bind(wx.EVT_LISTBOX_DCLICK, self.EvtListBoxDClick, self.lb1)
self.lb1.Bind(wx.EVT_RIGHT_UP, self.EvtRightButton) 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)) 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.Bind(wx.EVT_LISTBOX, self.EvtMultiListBox, self.lb2)
self.lb2.Bind(wx.EVT_RIGHT_UP, self.EvtRightButton) self.lb2.Bind(wx.EVT_RIGHT_UP, self.EvtRightButton)
self.lb2.SetSelection(0) self.lb2.SetSelection(0)
@@ -96,7 +96,7 @@ class TestListBox(wx.Panel):
'test abcd' ] 'test abcd' ]
sampleList.sort() sampleList.sort()
wx.StaticText(self, -1, "Find Prefix:", (15, 250)) 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) fp.SetSelection(0)

View File

@@ -13,7 +13,8 @@ import images
class TestNB(wx.Notebook): class TestNB(wx.Notebook):
def __init__(self, parent, id, log): 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_TOP # | wx.NB_MULTILINE
#wx.NB_BOTTOM #wx.NB_BOTTOM
#wx.NB_LEFT #wx.NB_LEFT

View File

@@ -13,14 +13,28 @@ import wx.lib.plot
# the file, as expected. | # 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): def runTest(frame, nb, log):
# Loading the demo class directly from the library's win = TestPanel(nb, log)
# test code. return win
win = wx.lib.plot.TestFrame(nb, -1, "PlotCanvas Demo")
frame.otherWin = win
return None
#---------------------------------------------------------------------- #----------------------------------------------------------------------

View File

@@ -224,7 +224,7 @@ class TestPanel(wx.Panel):
def OnButton(self, evt): def OnButton(self, evt):
win = TestFrame(frame, log) win = TestFrame(self, self.log)
win.Show(True) win.Show(True)