-2
这是我写的有两个按钮,并在我的GUI文本输入的代码:如何使用Python中的Tkinter将小部件放在一起?
#!/usr/bin/python
import Tkinter
from Tkinter import *
top = Tkinter.Tk()
b1 = Button (top, text = "Hack it!", height = 10, width = 20)
b2 = Button (top, text = " Clone! ", height = 10, width = 20)
t = Text(top,width=60,height=40)
b1.grid(row=0, column=0)
b2.grid(row=0, column=1)
t.grid(row=1)
top.mainloop()
但我想是这样的:
我该怎么办? (文本条目上方的标签也是理想的)
有什么办法让文本条目只读吗?
您可以在这里找到大部分Tkinter小部件的属性和方法:http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html –