![]() |
|
Assigning Zoom Modes to Mouse Buttons - Printable Version +- AB4D Forum (https://forum.ab4d.com) +-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4) +--- Forum: ZoomPanel (https://forum.ab4d.com/forumdisplay.php?fid=8) +--- Thread: Assigning Zoom Modes to Mouse Buttons (/showthread.php?tid=47) |
Assigning Zoom Modes to Mouse Buttons - staffordcastle - 07-05-2010 It would be cool if I could assign zoom modes to any of the mouse buttons. For example, have the left button be the zoom rectangle and when I click and hold the right button, it will pan. I got it to change modes when I click the right button by handling the MouseRightButtonDown event but Zoom Panel only drags the image when the left button is held. I would like to be able to configure it to drag/pan it with the right button held also. Is there a way I can do that now or perhaps you could put this in the next release. Thanks - Mark RE: Assigning Zoom Modes to Mouse Buttons - abenedik - 07-06-2010 Mark, thank you for your recommendation. I will surely consider your idea for the next version. With the current version it is also possible to achieve the functionality you need. It is a little bit tricky. I have changed the PainterSample.xaml.cs file that comes with ZoomPanel. First add the following at the end of constructor: Code: this.PreviewMouseRightButtonDown += new MouseButtonEventHandler(PainterSample_PreviewMouseRightButtonDown);Than add the following: Code: private Point _lastMoveMousePosition;I hope this solution will suite your needs until the next version of ZoomPanel. RE: Assigning Zoom Modes to Mouse Buttons - staffordcastle - 07-06-2010 Thank you so much!! I will try this out!! :D |