注意看这段代码,看到老外在linux上跑的时候,三段分别正常跑出界面,而我在Windows2003上跑的时候,只有前两段能跑出结果。也不知道怎么回事。如果哪位兄弟知道,还望不惜赐教。
from Tkinter import *
root=Tk()
root.geometry('200x100+270+50')
lab=Label(root,text='hi')
tex=Entry(root,bg='white')
but=Button(root,text='press')
che=Checkbutton(root,text='check')
#lab.pack()
#tex.pack()
#but.pack()
#che.pack()
#lab.place(x=0,y=0)
#tex.place(x=30,y=40)
#but.place(x=20,y=40)
#che.place(x=70,y=20)
lab.grid(row=0,colum=0)
tex.grid(row=0,colum=1)
but.grid(row=1,colum=0)
che.grid(row=1,colum=1)
root.mainloop()