Python tkinter.ttk 模块,Sizegrip() 实例源码

我们从Python开源项目中,提取了以下6个代码示例,用于说明如何使用tkinter.ttk.Sizegrip()

项目:Craft-Clash    作者:Derpyface-Development-Co    | 项目源码 | 文件源码
def create(self, **kwargs):
        return ttk.Sizegrip(self.root, **kwargs)
项目:Craft-Clash    作者:Derpyface-Development-Co    | 项目源码 | 文件源码
def create(self, **kwargs):
        return ttk.Sizegrip(self.root, **kwargs)
项目:pkinter    作者:DeflatedPickle    | 项目源码 | 文件源码
def add_sizegrip(self, side="right", anchor="s"):
        """Adds a SizeGrip to the Statusbar."""
        widget = ttk.Sizegrip(self)
        widget.pack(side=side, anchor=anchor)

        return widget
项目:ouroboros    作者:pybee    | 项目源码 | 文件源码
def create(self, **kwargs):
        return ttk.Sizegrip(self.root, **kwargs)
项目:kbe_server    作者:xiaohaoppy    | 项目源码 | 文件源码
def create(self, **kwargs):
        return ttk.Sizegrip(self.root, **kwargs)
项目:gophersnake    作者:felixplesoianu    | 项目源码 | 文件源码
def open_text_viewer(url, data):
    text = data.decode(encoding="latin_1")

    window = Toplevel(top)
    window.title("Gophersnake text viewer")

    textview = Text(window, width=80, height=25, wrap="word")
    textview.insert("1.0", text.replace("\r\n", "\n"))
    window.bind("<Control-a>", lambda e: select_all())
    textview.bind("<Control-c>", lambda e: copy_to_clipboard())
    #textview["state"] = "disabled"

    def select_all():
        textview.tag_remove("sel", "1.0", "end")
        textview.tag_add("sel", "1.0", "end")

    def copy_to_clipboard():
        window.clipboard_clear()
        window.clipboard_append(textview.get("sel.first", "sel.last"))

    textview.grid(row=0, column=0, sticky=(N, S, E, W))
    textview.focus_set()

    textscroll = ttk.Scrollbar(
        window, orient=VERTICAL, command=textview.yview)
    textview["yscrollcommand"] = textscroll.set
    textscroll.grid(row=0, column=1, sticky=(N, S))

    textstatus = ttk.Label(window, text=url)
    textstatus.grid(row=1, column=0, sticky=(E, W))

    textgrip = ttk.Sizegrip(window)
    textgrip.grid(row=1, column=1, sticky=(S, E))

    window.rowconfigure(0, weight=1)
    window.columnconfigure(0, weight=1)

# Broken as of 2016-08-29