def options_event(self, e):
d = wx.Dialog(None)
o = self.options
y = 10
components = []
for opt in o.listopt():
t = type(opt[2])
if t == type(2):
#sc = wx.SpinCtrl(d, pos=(180, y),
pass
if t == type(True):
chk = wx.CheckBox(d, pos=(180, y) , label=opt[1])
chk.SetValue(opt[2])
if opt[0] == "exprender":
for i01 in range(0, self.nb.GetPageCount()):
if isinstance(self.nb.GetPage(i01), BracketPage):
chk.Disable()
components.append((opt[0], chk))
y += 30
d.SetTitle("Options")
d.SetSize((250, y+100))
d.ShowModal()
for x in components:
o.update(**{x[0]:x[1].GetValue()})
self.options = o
评论列表
文章目录