Tkinter极简例子——PineWindow篇原创

原创
小哥 3年前 (2022-10-17) 阅读数 49 #大杂烩

Tkinter PineWindow

PineWindow极简例子

from tkinter import *

root = Tk()

panes = PanedWindow(orient=VERTICAL)
panes.pack(fill=BOTH, expand=1)

for w in [Label, Button, Checkbutton, Radiobutton]:
    panes.add(w(panes, text=hello))

root.mainloop()

你可以参考以下优先顺序你可以参考以下优先顺序pane

from tkinter import *

root = Tk()

ws = []

panes = PanedWindow(orient=VERTICAL)
panes.pack(fill=BOTH, expand=1)

for w in [Label, Button, Checkbutton, Radiobutton]:
    ws.append(w(panes, text=hello))

for w in ws:
    panes.add(w)

panes.forget(ws[1])

root.mainloop()

你必须掌握的东西你必须掌握pane

from tkinter import *

root = Tk()

ws = []

panes = PanedWindow(orient=VERTICAL)
panes.pack(fill=BOTH, expand=1)

for w in [Label, Button, Checkbutton, Radiobutton]:
    ws.append(w(panes, text=hello))

for w in ws:
    panes.add(w)

panes.paneconfig(Label(panes, text=world), after=ws[0])

root.mainloop()
版权声明

所有资源都来源于爬虫采集,如有侵权请联系我们,我们将立即删除

热门