Hello.I 'am beginner with tkinter and I build a simple calculator app and I have a problem with position of 3 buttons (+ , - , =).
I have 2 photos to see my problem & understand.
1st Photo[
^]
2nd photo[
^]
2nd photo is the original size of window.
So, I want to put (- , + and =) under button 2 and 3.
How can I do it?
What I have tried:
from tkinter import *
root = Tk()
root.geometry("403x440")
root.title("Calculator")
window = Entry(root , width = 40).grid(row = 0 , column = 0, padx = 35 , columnspan = 3)
button_7 = Button(root , text = "7" , padx = 60, pady = 40).grid(row = 1 , column = 0)
button_8 = Button(root , text = "8" , padx = 60, pady = 40).grid(row = 1 , column = 1)
button_9 = Button(root , text = "9" , padx = 60, pady = 40).grid(row = 1 , column = 2)
button_4 = Button(root , text = "4" , padx = 60, pady = 40).grid(row = 2 , column = 0)
button_5 = Button(root , text = "5" , padx = 60, pady = 40).grid(row = 2 , column = 1)
button_6 = Button(root , text = "6" , padx = 60, pady = 40).grid(row = 2 , column = 2)
button_1 = Button(root , text = "1" , padx = 60, pady = 40).grid(row = 3 , column = 0)
button_2 = Button(root , text = "2" , padx = 60, pady = 40).grid(row = 3 , column = 1)
button_3 = Button(root , text = "3" , padx = 60, pady = 40).grid(row = 3 , column = 2)
button_0 = Button(root , text = "0" , padx = 60, pady = 40).grid(row = 4 , column = 0)
button_minus = Button(root , text = "-" , padx = 40, pady = 40).grid(row = 4 , column = 1)
button_add = Button(root , text = "+" , padx = 40, pady = 40).grid(row = 4 , column = 2)
button_equal = Button(root , text = "=" , padx = 40, pady = 40).grid(row = 4 , column = 3)
root.mainloop()
Thanks.