def __init__(self, parent, text_on="On", text_off="Off", *args):
ttk.Checkbutton.__init__(self, parent, style="TButton", *args)
self.parent = parent
self._text_on = text_on
self._text_off = text_off
self._variable = tk.IntVar()
self.configure(variable=self._variable, command=self._activate)
self._activate()
评论列表
文章目录