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)
评论列表
文章目录