Re: oval

2005-12-05 Thread Peter Otten
Ben Bush wrote: > is there any good material to read if I want to improve my > understanding of working on interactive ways of dealing with shapes > on the TKinter? See http://wiki.python.org/moin/TkInter for a list of references. For me John Shipman's Tkinter Reference is normally sufficient.

Re: oval

2005-12-04 Thread Ben Bush
On 12/4/05, Peter Otten <[EMAIL PROTECTED]> wrote: > Ben Bush wrote: > > > On 12/4/05, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > >> Ben Bush wrote: > >> > I tested the following code and wanted to get the message of "oval2 > >> > got hit" if I click the red one. But I always got "oval1 got hit"

Re: oval

2005-12-04 Thread Ben Bush
On 12/4/05, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > >> > >>What you want instead is something like > >> > >>if event.source == a: > >>... > >> > >>Please note that I don't know what event actually looks like in Tkinter, > >>so check the docs what actually gets passed to you. > > > > > > g

Re: oval

2005-12-04 Thread Diez B. Roggisch
>> >>What you want instead is something like >> >>if event.source == a: >>... >> >>Please note that I don't know what event actually looks like in Tkinter, >>so check the docs what actually gets passed to you. > > > got AttributeError: Event instance has no attribute 'source' As I said: I do

Re: oval

2005-12-04 Thread Peter Otten
Ben Bush wrote: > On 12/4/05, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >> Ben Bush wrote: >> > I tested the following code and wanted to get the message of "oval2 >> > got hit" if I click the red one. But I always got "oval1 got hit". >> > from Tkinter import * >> > root=Tk() >> > canvas=Canvas

Re: oval

2005-12-04 Thread Ben Bush
On 12/4/05, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > Ben Bush wrote: > > I tested the following code and wanted to get the message of "oval2 > > got hit" if I click the red one. But I always got "oval1 got hit". > > from Tkinter import * > > root=Tk() > > canvas=Canvas(root,width=100,height=10

Re: oval

2005-12-04 Thread Diez B. Roggisch
Ben Bush wrote: > I tested the following code and wanted to get the message of "oval2 > got hit" if I click the red one. But I always got "oval1 got hit". > from Tkinter import * > root=Tk() > canvas=Canvas(root,width=100,height=100) > canvas.pack() > a=canvas.create_oval(10,10,20,20,tags='oval1',f