prompt = ">>"
from tkinter import *
root = Tk()
userName = Entry()
myLabel = Label(root, text="UserName")
userName.grid(row=0)
myLabel = Label.grid(row=0, column=1)
root.mainloop()
TypeError: grid_configure() missing 1 required positional argument: 'self'
This statement is incorrect:
myLabel = Label.grid(row=0, column=1)
At the very least it needs to be this:
myLabel = Label().grid(row=0, column=1)
Though, if you want mayLabel
to be anything other than None
you need to use two lines:
myLabel = Label()
myLabel.grid(row=0, column=1)
Though, if you want to use the previous definition of myLabel
, maybe you need to simply omit myLabel = Label()
, since that creates a new empty label.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments