tkinter grid not working correctly

爷,独闯天下 提交于 2019-11-27 08:25:32

问题


when I try to make a window using tkinter in python 3.4.2, the windows opens, but the ..grid method doesnt function properly. The label and entry box dont move even though I change the row and column parameters. Please help:

from tkinter import *
root = Tk()

root.geometry("1024x768")
root.resizable(width=FALSE, height=FALSE)


label_title = Label(root, text="Past paper helper")
entry_1 = Entry(root)



label_title.grid(row=0, column=5)
entry_1.grid(row=16, column=1)

root.mainloop()

回答1:


Empty rows and columns have zero size. Column 1000 will give the same effect as column 0, if columns 0-999 are empty. Sames goes for rows.



来源:https://stackoverflow.com/questions/34963757/tkinter-grid-not-working-correctly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!