0

I want to extend the solution to my former question such as once the rectangle around the region of interest is drawn using the mouse, the user can adjust one of the lines (edges) of the rectangle using the mouse instead of re-drawing the whole rectangle from the start.

Unfortunately I did not try anything because simply I have no idea how to do it.

Any help is greatly appreciated.

Community
  • 1
  • 1

1 Answers1

1

Add a binding to the rectangle for <ButtonPress-1>, <ButtonRelease-1> and <B1-Motion>. When you detect the click on a side, the handler for <B1-Motion> can modify the coordinates of the item.

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685