gui programming ii def _motion_event(event)global _dragx mouse_xmouse_y event event if not _dragmouse_x mouse_y _drag true return +=( -mouse_xx +=( -mouse_xy +=( -mouse_yy +=( -mouse_ycanvas coords(rect, , , , mouse_x mouse_y def _release_event(event)global _drag _drag false root=tk(label label(canvas canvas(width= height= canvas bind'mouse_motion_eventcanvas bind' _eventcanvas bind' _motion_eventcanvas bind' _release_eventcanvas bind'wheel_eventcanvas focus_set(canvas grid(row= column= label grid(row= column= mouse_x mouse_y _drag false color 'blue rect canvas create_rectangle( , , , ,fill=colormainloop(