lockbutton.py 文件源码

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

项目:pkinter 作者: DeflatedPickle 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号