Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tkinter coords
#1
Hi, I want to move my object (image) in tkinter, but it doesn´t work. This is what I have so far:

class Playfield:
...
def build_playfield(self):
...
self.field_icon_player = tkinter.PhotoImage(file="player.png")
...
self.canvas.create_image(j*50, i*50, anchor=NW, image=self.field_icon_player)
...

        for i in range(100):
            self.canvas.coords(self.field_icon_player, 10, 10)
How can I move with this object? Coords doesn´t work in this case. Am I doing something wrong with implementing this inside a class? Thanks.
Reply


Messages In This Thread
Tkinter coords - by dan789 - Dec-17-2018, 04:26 PM
RE: Tkinter coords - by wuf - Dec-17-2018, 06:04 PM
RE: Tkinter coords - by Larz60+ - Dec-17-2018, 06:55 PM
RE: Tkinter coords - by deanhystad - Aug-07-2023, 03:14 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020