switcher.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:IntroPython2016a 作者: UWPCE-PythonCert 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号