简体   繁体   中英

tkinter grid not working correctly

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()

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM