Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #40971 > unrolled thread

how to déplace a circle in canvas python?

Started byolsr.kamal@gmail.com
First post2013-03-09 11:47 -0800
Last post2013-03-09 12:54 -0800
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  how to déplace a circle in canvas python? olsr.kamal@gmail.com - 2013-03-09 11:47 -0800
    Re: how to déplace a circle in canvas python? Rick Johnson <rantingrickjohnson@gmail.com> - 2013-03-09 12:54 -0800

#40971 — how to déplace a circle in canvas python?

Fromolsr.kamal@gmail.com
Date2013-03-09 11:47 -0800
Subjecthow to déplace a circle in canvas python?
Message-ID<8989c2cd-0a17-44f2-9744-dbce2265dac3@googlegroups.com>
how to diplace a circle in canvas tkinter python from position to an auther position by a mouse click 'press' 'relase' or by delete the déplicated objects in canvas??

[toc] | [next] | [standalone]


#40976

FromRick Johnson <rantingrickjohnson@gmail.com>
Date2013-03-09 12:54 -0800
Message-ID<4c61a0a4-83ae-48d9-8851-ad14499a61a6@googlegroups.com>
In reply to#40971
On Saturday, March 9, 2013 1:47:43 PM UTC-6, olsr....@gmail.com wrote:
> how to [translate] a circle in canvas tkinter python from
> [one] position to an [another] position 

Well "translation" is by definition: "changing an objects position"

> by a mouse click 'press' ['release'] or by delete the [duplicated] objects
> in canvas??

Here's an idea: how about you learn how to translate a Tkinter canvas object via code BEFORE you try to do it via user input? This is called "code evolution along an intelligent linear path", not some "random shots in the dark".

How do you do this you ask, well i'll give you a hint, follow this yellow brick road for enlightenment.

============================================================
 STEP 1
============================================================

Take a look at the following methods available to the Tkinter canvas widget here:
    
 http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/canvas-methods.html
 
Can you find a method that will "translate" or "displace" or (insert another synonym here), a canvas object by passing two (x,y) Cartesian coordinates? Once you can accomplish step 1, we can move on to step 2.

============================================================
 STEP 2
============================================================

Solving "Step 1" is compulsory!

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web