Text()介绍:点击打开链接
e.g.1 创建一个窗口组件,插入到text中
from tkinter import *
root=Tk()
text=Text(root,width=30,height=5)
text.pack()
text.insert(INSERT,'I Love\n')#INSERT表示在光标位置插入
text.insert(END,'FishC.com!\n')#END表示在末尾处插入
def show():
print('我被点了~')
#创建一个窗口组件,插入到text中
b1=Button(text,text='点我点我',command=show)
text.window_create(INSERT,window=b1)
mainloop()
e.g.2 事件绑定,链接到该网址