Hello,
I have a problem or maybe a behavior that I don't fully understand in an ImageEnView, for which I deactivated the automatic zoom function and instead handle zooming with the OnMouseWheelUp/Down-events, in which the ImageEnView.Zoom is set manually. Also there is an OnDrawCanvas-event, in which things are done.
When I now scroll per mouse wheel, the respective event is triggered, Zoom is set and OnDrawCanvas is triggered as expected. However, after a short fraction of a second, maybe 200-400 ms, in which the program continues to run, OnDrawCanvas is triggered another time, which in this particular program screws things up.
To be sure I isolated the ImageEnView into an empty project, gave it the two mousewheel-events, which do nothing but setting Zoom, and an OnDrawCanvas, which does nothing except being triggered, and the behavior is the same: OnDrawCanvas is triggered immediately on Zooming and again after a short moment.
Is this normal behavior which I have to work around or am I probably doing something wrong in terms of settings or usage of OnDrawCanvas? |