Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Panning image window programmatically

Hey everyone,

im trying to pan my image (after zooming in) using the RB event instead of the LB event, but i can't find any information on how to do that. i open an image using cv2.imshow(...) and zoom in on it. Now, holding and dragging the left mouse button i can pan across the image. I would like to enable this behavior when clicking the right mouse button instead.

Catching the RBDOWN event is not an issue, but i don't know what to do afterwards. I would prefer not to use another library if possible (because of multi platform, maintenance and space)

possible solutions i can think of but am not sure how to implement:

  • "reroute" RB click to LB click using a click event (this probably needs another library?)
  • call the underlying panning function that triggers when LBDOWN+ drag happens (can't find anything on this?)

does anyone have ideas on how to solve this problem?

Panning image window programmatically

Hey everyone,

im trying to pan my image (after zooming in) using the RB event instead of the LB event, but i can't find any information on how to do that. i open an image using cv2.imshow(...) and zoom in on it. Now, holding and dragging the left mouse button i can pan across the image. I would like to enable this behavior when clicking the right mouse button instead.

Catching Catching/handling the RBDOWN event is not an issue, issue, but i don't know what to do afterwards. I would prefer not to use another library if possible (because of multi platform, maintenance and space)

possible solutions i can think of but am not sure how to implement:

  • "reroute" RB click to LB click using a click event (this probably needs another library?)
  • call the underlying panning function that triggers when LBDOWN+ drag happens (can't find anything on this?)

does anyone have ideas on how to solve this problem?

Panning image window programmatically

Hey everyone,

im trying to pan my image (after zooming in) using the RB event instead of the LB event, but i can't find any information on how to do that. i open an image using cv2.imshow(...) and zoom in on it. Now, holding and dragging the left mouse button i can pan across the image. I would like to enable this behavior when clicking the right mouse button instead.

Catching/handling the RBDOWN event is not an issue, but i don't know what to do afterwards. I would prefer not to use another library if possible (because of multi platform, maintenance and space)

possible solutions i can think of but am not sure how to implement:

  • "reroute" RB click to LB click using a click event (this probably needs another library?)
  • call the underlying panning function that triggers when LBDOWN+ drag happens (can't find anything on this?)

does anyone have ideas on how to solve this problem?