Using Zelle Graphics.py - is there a way to create a mouse-down draggable event? I have an easy way to create points, but cannot get them to continue to draw as the mouse is dragged or while the button is pressed. I am pretty sure that tkinter has a way of doing this, but I am unsure of how to incorporate that into this code. Does graphics.py have a method?
from graphics import *
win = GraphWin("drag", 500, 500)
win.master.attributes('-topmost', True)
point1 = Point(250, 250)
point1.draw(win)
while True:
coord = win.checkMouse()
if coord == None:
pass
else:
point1 = Point(coord.getX(), coord.getY())
point1.setFill("red")
point1.draw(win)
win.mainloop()
I tried it with tkinter bindings and came up with this solution. Now I am looking for a way to include a game loop in the mix.