Re: drawline

2005-11-25 Thread Ben Bush
On 11/23/05, Magnus Lycka <[EMAIL PROTECTED]> wrote: > Ben Bush wrote: > > I had the following code and when I clicked the left mouse button one > > time. I got green line and the second click got a purple line and the > > green disappeared. > > I was confused by two questions: > > It's good that t

Re: drawline

2005-11-23 Thread Magnus Lycka
Ben Bush wrote: > I had the following code and when I clicked the left mouse button one > time. I got green line and the second click got a purple line and the > green disappeared. > I was confused by two questions: It's good that these postings are archived, so that teachers can check them before

Re: drawline

2005-11-22 Thread Eugene Druker
"purple", 'b' ], ] ClickMax = len(lines) ClickNum = 0 lasttag = '' def drawline(event): global ClickNum,lasttag canvas.delete(lasttag) line = lines[ClickNum] canvas.create_line(line[0], arrow=line[1], fill=line[2],tag=line[3]) lasttag = lin

drawline

2005-11-22 Thread Ben Bush
? Second, how to do something like: I click the left button the first time, the green line appear then disappear, the purple line appear(just as the code has done but become a loop; if a second-time click is implied, the loop stops. from Tkinter import * ClickNum = 0 def drawline(event): global