python tkinter gridb布局显示问题求助
1个回答
展开全部
from tkinter import *
root = Tk()
Label(root,text = "帐号").grid(row = 0,sticky = W)
Label(root,text = "密码").grid(row = 1,sticky = W)
v = StringVar()
v.set("172.0.0.1")
e1 = Entry(root,textvariable = v)
e2 = Entry(root)
e1.grid(row = 0,columns = 1,sticky = E)
e2.grid(row = 1,columns = 1,sticky = E)
Label(root,text = '登录').grid(row = 3,sticky = W+E)
root.mainloop()
root = Tk()
Label(root,text = "帐号").grid(row = 0,sticky = W)
Label(root,text = "密码").grid(row = 1,sticky = W)
v = StringVar()
v.set("172.0.0.1")
e1 = Entry(root,textvariable = v)
e2 = Entry(root)
e1.grid(row = 0,columns = 1,sticky = E)
e2.grid(row = 1,columns = 1,sticky = E)
Label(root,text = '登录').grid(row = 3,sticky = W+E)
root.mainloop()
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询