python - Entry widget doesn't work -
i'm new python , need problem. how user input on canvas? i've tried taking out x=
, y=
doesn't work... after run module says "non-keyword arg after keyword arg". please help.
from tkinter import* def main(): global window global tkinter global canvas window = tk() canvas = canvas(window, width=400, height=300, bg='blue') e1 = entry(canvas) canvas.create_window(window=e1, x=100,y=100) e1.pack() canvas.pack() window.mainloop() main()
the position of created window has passed first 2 arguments, not keyword arguments.
canvas.create_window(100, 100, window=e1)
also, entry
widget doesn't need packed when used in manner, e1.pack()
line should removed entirely.
Comments
Post a Comment