This is the code I tried at fix.
label = tk.Label(frame1)
label.pack(relx=0.1, rely=0.1)
I tried doing this but it says that I need to add -anchor
, -before
, -expand
, -fill
, -in
, -ipadx
, -ipady
, -padx
, -pady
, or -side
.
label = tk.Label(frame1)
label.pack(anchor='n'r, elx=0.1, rely=0.1)
You should use place()
instead pack()
So your code must be like this:
label = tk.Label(frame1)
label.place(relx=0.1, rely=0.1)
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.