| """ turtle-example-suite: |
| A simple eventdriven paint program |
| - use left mouse button to move turtle |
| - middle mouse button to change color |
| - right mouse button do turn filling on/off |
| ------------------------------------------- |
| Play around by clicking into the canvas |
| using all three mouse buttons. |
| ------------------------------------------- |
| To exit press STOP button |
| ------------------------------------------- |
| def switchupdown(x=0, y=0): |
| def changecolor(x=0, y=0): |
| colors = colors[1:]+colors[:1] |
| colors=["red", "green", "blue", "yellow"] |
| onscreenclick(changecolor,2) |
| onscreenclick(switchupdown,3) |
| if __name__ == "__main__": |