【发布时间】:2019-05-01 23:25:06
【问题描述】:
我在 Tkinter 中创建了一个表单,但是当它被响应时,我需要将信息连接到一个文本框。
假设我选择我住在芝加哥,当我按下“发送”按钮时,如何将该信息发送到滚动文本?
lblCd= Label(ventana,text="Location:",font= ("Arial", 20),
fg="blue", bg="white").place(x=70,y=400)
combo['values']=("Chicago","NY", "Texas")
combo.current(1)
combo.place(x=260, y=400)
Btn=Button(ventana, text="Send",)
Btn.place(x=200,y=500)
txt=scrolledtext.ScrolledText(ventana, width=40, height=10)
txt.place(x=260, y= 550)
txt.insert(INSERT, Nombre)
【问题讨论】:
-
Button(..., command=function_name)
标签: python python-3.x user-interface tkinter