By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,630 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,630 IT Pros & Developers. It's quick & easy.

Change coords of a canvas.line item

P: n/a
Hi all,

I want to change the beginning/end-coordinates of a canvas.line item.

Something like:

self.myCanvas.itemconfigure(item_id, coords=(x1_new, y1_new, x2_new,
y2_new))

I don't want to delete and repaint a new line item. Is this possible?

Thanks

Matthias

Jan 5 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Matthias Vodel wrote:
I want to change the beginning/end-coordinates of a canvas.line item.

Something like:

self.myCanvas.itemconfigure(item_id, coords=(x1_new, y1_new, x2_new, y2_new))
self.myCanvas.coords(item_id, x1_new, y1_new, x2_new, y2_new)

</F>

Jan 5 '07 #2

P: n/a
Very nice :)

Thank you,

Matthias
Jan 5 '07 #3

P: n/a
Fredrik Lundh wrote:
Matthias Vodel wrote:
>I want to change the beginning/end-coordinates of a canvas.line item.

Something like:

self.myCanvas.itemconfigure(item_id, coords=(x1_new, y1_new, x2_new, y2_new))

self.myCanvas.coords(item_id, x1_new, y1_new, x2_new, y2_new)
You can also use insert and dchars methods to add and delete
vertices (useful for polylines/polygons).

w.
Jan 5 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.