I have generated a circle with graphic.py. I want the color of the circle to change with a mouse click. How can I create a mouse event for this?
def draw_circle():
#make green circle
win = GraphWin('Traffic Lights', 400,400)
win.setBackground(color_rgb(211,211,211))
pt = Point(200,200)
cir = Circle(pt,50)
cir.setFill('Green')
cir.draw(win)
win.getMouse
initial()
def click:
#action to take place
# when mouse cicked
add_mouse_click_handler(click)
main()