赞
踩
import tkinter as tk
window = tk.Tk()
window.title('my windows')
window.geometry('200x200')
e = tk.Entry(window, show=None) # show="*"
e.pack()
def insert_point():
var = e.get()
t.insert('insert',var)
def insert_end():
var= e.get()
t.insert(1.1, var) #1.1是第一行,第一列
b1 = tk.Button(window, text='insert point', width=15,height=2, command=insert_point)
b1.pack()
b2 = tk.Button(window,text='insert end', command=insert_end)
b2.pack()
t = tk.Text(window, height=2)
t.pack()
window.mainloop()
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。