import tkinter as tk
import tkinter.ttk as ttk
class TaxCalc(object):
taxPoint = 5000
def __init__(self):
self.top = tk.Tk()
self.top.title("个人所得税计算器")
sw,sh = self.top.winfo_screenwidth(),self.top.winfo_screenheight()
ww,wh = 245,280
self.top.geometry("{}x{}+{}+{}".format(ww,wh,(sw-ww)//2,(sh-wh)//2))
self.top.resizable(0,0)
self.createWdiget()
self.top.wm_attributes('-topmost',1) #主窗口置顶
self.top.mainloop()
def createWdiget(self):
self.beforeTaxLable = tk.Label(self.top,text="税前工资:")
self.beforeTaxLable.grid(row=0,column=0)
self.beforeTaxEntry = tk.Entry(self.top)
self.beforeTaxEntry.grid(row=0,column=1,pady=10,padx=10)
self.insuranceLable= tk.Label(self.top,text="扣除的保险&#x