⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 myapplication.py

📁 Python.Tkinter编程实例代码多多学习
💻 PY
字号:
from Tkinter import *

def main():
    root = Tk()
    root.title('Buttons')
    f = Frame(root, width=300, height=110)
    xf = Frame(f, relief=GROOVE, borderwidth=2)
    Label(xf, text="You shot him!").pack(pady=10)
    Button(xf, text="He's dead!", state=DISABLED).pack(side=LEFT,
                                                       padx=5, pady=8)
    Button(xf, text="He's completely dead!",
           command=root.quit).pack(side=RIGHT, padx=5, pady=8)
    xf.place(relx=0.01, rely=0.125, anchor=NW)
    Label(f, text='Self-defence against fruit').place(relx=.06, rely=0.125,
                                                      anchor=W)
    f.pack()
    root.mainloop()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -