def __init__(self, parent, *args, **kwargs):
"""
create a new swither instance.
:param parent: the parent frame -- this is designed to go on an
AddBookFrame object
:params *args, **kwargs: all the other arguments that a wx.Window takes.
"""
print "in __init__"
wx.Panel.__init__(self, parent, *args, **kwargs)
self.add_book_frame = parent
##Create the buttons to scroll through add_book_frame
prev_button = wx.Button(self, label="Previous")
prev_button.Bind(wx.EVT_BUTTON, self.onPrev)
next_button = wx.Button(self, label="Next")
next_button.Bind(wx.EVT_BUTTON, self.onNext)
## use a Sizer to lay it out
S = wx.BoxSizer(wx.HORIZONTAL)
S.Add(prev_button, 1, wx.ALL, 4)
S.Add((10,1),0)
S.Add(wx.StaticText(self,label="AddressBook"),
0,
wx.ALIGN_CENTER_HORIZONTAL|wx.ALL,
4)
S.Add((10,1),0)
S.Add(next_button, 1,wx.ALL, 4)
self.SetSizerAndFit(S)
评论列表
文章目录