I am new to canvas and have built an app with rectangles. My goal is to use the mouse_up and mouse_down to drag these rectangles around. So far I have a function in_bubble(self, x, y, tup) that works and a mouse down
def canvas_1_mouse_down (self, x, y, button, **event_args):
# This method is called when a mouse button is pressed on this component
x = int(x)
y = int(y)
coord = self.coord
for elm in coord:
loc = coord.index(elm)
for elm in coord:
if in_bubble(x, y, elm) is True:
loc = coord.index(elm)
coord.insert(loc, (x, y))
But I got to the point of realizing that this mouse_down is a one time function when clicked and how do I keep this process of updating the coordinate of my bubbles until the mouse is released. It is getting late and I thought I would send it out to you guys in hopes this would not keep me up. Any resources you can pass on to me in regards to canvas would be greatly appreciated. Hope you are having a lovely day.