gui.py 文件源码

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

项目:bp5000 作者: isaiahr 项目源码 文件源码
def new_event(self, e):
        h = 220
        d = wx.Dialog(None)
        sc = wx.SpinCtrl(d, pos=(180, 10), min=1,
                         initial=2, max=99, size=(40, 40))
        scl = wx.StaticText(d, pos=(10, 17), label="# of eliminations")
        name = wx.TextCtrl(d, pos=(20, 74),
                           value="My Tournament", size=(190, 40))
        namel = wx.StaticText(d, pos=(20, 57), label="Tournament Name")
        okbtn = wx.Button(d, label='OK', pos=(30, h-70))

        def newev(e):
            d.Close()
            page = ManagementPage(self.nb, name.GetValue(), sc.GetValue())
            self.nb.AddPage(page, name.GetValue())

        d.Bind(wx.EVT_BUTTON, newev, okbtn)
        cancelbtn = wx.Button(d, label='Cancel', pos=(150, h-70))

        def c(e):
            d.Close()

        d.Bind(wx.EVT_BUTTON, c, cancelbtn)
        d.SetSize((250, h))
        d.SetTitle("Create new")
        d.Show(True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号