def __init__(self, parent, lock_text="Lock", lock_image="", unlock_text="Unlock", unlock_image="", *args):
ttk.Checkbutton.__init__(self, parent, compound="left", command=self._activate, style="TButton", *args)
self.parent = parent
self._lock_text = lock_text
self._unlock_text = unlock_text
self._lock_image = tk.PhotoImage(file=lock_image)
self._unlock_image = tk.PhotoImage(file=unlock_image)
self._variable = tk.IntVar()
self._variable.set(True)
self.configure(variable=self._variable)
self._activate()
评论列表
文章目录