O
O
Oleksandr Shengera2021-10-27 12:35:02
Python
Oleksandr Shengera, 2021-10-27 12:35:02

How to fix a bug in Tkinter?

File "C:\Users\Oleksandr\Desktop\subline\calculator.py", line 23, in
root.grid_columnconfigure(minsize=60)
TypeError: Misc.grid_columnconfigure() missing 1 required positional argument: 'index'

from tkinter import *
root =Tk()
root ["bg"]="#A1A1A1"
root.title("Calculator")
root.wm_attributes("-alpha", 1)
root.geometry("400x480")
root.resizable(height=False, width=False)
wind=Entry(root)
wind.grid(row=0, column=0, columnspan=3)

Button(text=1).grid(row=1, column=0)
Button(text=2).grid(row=1, column=1)
Button(text=3).grid(row=1, column=2)
Button(text=4).grid(row=2, column=0)
Button(text=5).grid(row=2, column=1)
Button(text=6).grid(row=2, column=2)
Button(text=7).grid(row=3, column=0)
Button(text=8).grid(row=3, column=1)
Button(text=9).grid(row=3, column=2)
Button(text=0).grid(row=4, column=0)


root.grid_columnconfigure(0, minsize=60)
root.grid_columnconfigure(1, minsize=60)
root.grid_columnconfigure(2, minsize=60)
root.mainloop()

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-10-27
@Vindicar

You don't have such a line in your code. Check which file you are running.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question