Mouse Wheel zoom
#1
If I bring up the ZoomPanel Samples, and select "Basic" under ZoomPanel, the SVG tiger comes up.

As soon as that window has focus, and the mouse is hovering over the tiger image, I can use the Mouse Wheel to zoom in and out. I do not need to click on the SVG image or make any selections, the mouse wheel works as soon as I hover over the SVG image.

In my program, this is not the case. I have to click on the Move a couple of times before the Mouse Wheel zoom will work.

What can I do to make it work like the example, where the Mouse Wheel works to zoom the SVG without having to click on anything?

-rwg
#2
It looks like the ZoomPanel does not receives the mouse events.

This can be caused by having focus on some other element. Try calling Focus on the ZoomPanel.

If you would like to use mouse wheel also when the mouse is not exactly over the shown object but is on its background (let's say a little bit right of the tiger's head), you can set the Background property of the "tiger's" parent element to White or Transparent - having it to null will not send mouse event to this elements. But if it is Transparent (or White, etc.) the mouse events will be send to this element also.
Andrej Benedik
#3
OK Focus() was the key to the solution. And I have to set the focus after I load each new SVG into the control. Thanks for the tip.

-rwg
  


Forum Jump:


Users browsing this thread:
2 Guest(s)