collapsiblepane.py 文件源码

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

项目:pkinter 作者: DeflatedPickle 项目源码 文件源码
def __init__(self, parent, expanded_text="Collapse <<", collapsed_text="Expand >>", *args):
        ttk.Frame.__init__(self, parent, *args)
        self.parent = parent
        self._expanded_text = expanded_text
        self._collapsed_text = collapsed_text

        self.columnconfigure(1, weight=1)

        self._variable = tk.IntVar()
        self._button = ttk.Checkbutton(self, variable=self._variable, command=self._activate, style="TButton")
        self._button.grid(row=0, column=0)

        self._separator = ttk.Separator(self, orient="horizontal")
        self._separator.grid(row=0, column=1, sticky="we")

        self.frame = ttk.Frame(self)

        self._activate()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号