From c9f87b3e4f48989abfdd58476013f2da55dc956b Mon Sep 17 00:00:00 2001 From: superdimensional Date: Fri, 30 Apr 2021 18:23:50 -0400 Subject: [PATCH] buttons move with respect to window size --- ben10.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ben10.py b/ben10.py index dd100eb..060abfa 100644 --- a/ben10.py +++ b/ben10.py @@ -8,11 +8,11 @@ root.title("Omnitrix") # root.attributes('-fullscreen', True) root.geometry("640x480") root.configure(bg="#70b607") +root.columnconfigure(1, weight=1) +root.rowconfigure(1, weight=1) # root window parameters -# grid to hold buttons - path = "res/omnitrix.png" img = ImageTk.PhotoImage(Image.open(path)) @@ -43,6 +43,8 @@ omnitrix_left = Button(root, text="<", fg="white", bg="black", command=lambda: count_down(omnitrix_button), highlightthickness=0, bd=0, height=30, width=4) # omnitrix_left.pack(side="left") omnitrix_left.grid(column=0, row=1, rowspan=3) + + # changes alien button (left) omnitrix_right = Button(root, text=">", fg="white", bg="black",