From: Hidetoshi NAGAI Date: 2004-08-22T03:28:07+09:00 Subject: Re: Fake Tk events Hi, From: "Phlip" Subject: Re: Fake Tk events Date: Fri, 20 Aug 2004 01:27:10 +0900 Message-ID: <8s4Vc.4183$Y94.225@newssvr33.news.prodigy.com> > I will try that next. But I'm stuck again, here: Hmmm... Probably, to generate events on canvas items, the canvas requires to know the mouse position by 'Enter' or 'Motion' event. Please try to add one line to your script such as the following. > def click(what, how = 'Button-1') > x1,y1,x2,y2 = what.bbox > cx = (x2 + x1) / 2 > cy = (y2 - y1) / 2 > Tk.update() > what.event_generate('Motion', :x => cx, :y => cy) > what.event_generate(how, :x => cx, :y => cy) > end -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)