ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  ZoomInCursor and ZoomOutCursor
Posted by Sergei on Oct-31-2017 20:02
Attachments:
Hello!
How do I know when the cursor changes from "ZoomIn" to "Magnifying glass" or from "ZoomOut" to "Magnifying glass"?

Best regard, Sergei
_ZoomIn.png
_Magnifying glass.png

  Re: ZoomInCursor and ZoomOutCursor
Posted by Peter Kwan on Nov-01-2017 01:42
Hi Sergei,

If the mouse is in "Zoom In" mode, and the mouse is over the plot area, it will change to a magnifying glass icon with a "+" sign in it. However, if it is impossible to zoom in anymore because the chart has already reached the maximum zoom in limit, the icon will change to an empty magnifying glass. See:

http://www.advsofteng.com/doc/cdnet.htm#WinChartViewer.ZoomInWidthLimit.htm

If the mouse is in "Zoom In" mode, and the mouse is over the plot area, it will change to a magnifying glass icon with a "-" sign in it. However, if it is impossible to zoom out anymore, such as if the chart has already been displaying the full data range, the icon will change to an empty magnifying glass.

So to determine the mouse cursor, you can check if the current MouseUsage, and check if the ViewPortWidth has already reached the ZoomInLimit (for zoom in), or if the ViewPortWidth has already reached 1 (for zoom out).

Hope this can help.

Regards
Peter Kwan

  Re: ZoomInCursor and ZoomOutCursor
Posted by Sergei on Nov-01-2017 14:02
Thank you!