加功德的东西
import tkinter as tk
class APP:
def __init__(self, master):
frame = tk.Frame(master)
frame.pack(side=tk.LEFT, padx=100, pady=10)
self.hi_there = tk.Button(frame, text='木鱼', fg='red', command=self.say_hi)
self.hi_there.pack()
def say_hi(self):
print('功德 + 1')
root = tk.Tk()
app = APP(root)
root.mainloop()
木鱼
页:
[1]