If I want to find the X coordinate of an image that's already on a canvas, how would I do that with tkinter?

Recommended Answers

All 4 Replies

Can you explain a little further?

Have you loaded the image?

I ultimately want compare the positions of two images. Yes, they have been loaded, tagged and displayed already. After being displayed, I'm using

canvas.move(myImgTagName, x, y)

to move them around on the canvas. After they are done moving, I want to find out which one has a greater X coordinate on the canvas.

Then the image with the higher coordinate in x, it's the image in wich the sum of the loading x and the size in x is greater.

You're right, but I was looking for a canvas command that would just show me the current position. Like canvas.posX(img1) or some thing like that.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.