import tkinter as tk
from tkinter import *
win=tk.Tk()
win.title("管理系统")
win.geometry("800x700")
def hit_zhang():
zhang = "张三"
win_zhang = tk.Toplevel()
win_zhang.title(zhang)
win_zhang.geometry("800x700")
tk.Label(win_zhang, text="编号:", font=("宋体", 24)).place(x=130, y=110)
id = StringVar()
id = tk.Entry(win_zhang, textvariable=id, font=("宋体", 24), bg="yellow")
id.place(x=300, y=115)
var_id = id.get()
def hit_id():
win_id = tk.Toplevel()
win_id.title("信息确认")
win_id.geometry("500x400")
tk.Label(win_id, text="张三编号:" + var_id, font=("宋体", 24)).place(x=100, y=80)
bid = tk.Button(win_zhang, text="确认", font=("宋体", 48), width=15, height=1, command=hit_id)
bid.place(x=140, y=300)
bzhang = tk.Button(win,text="张三",font=("宋体",48),width=15,height=1,command=hit_zhang)
bzhang.pack()
win.mainloop()
|