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
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
"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
?
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