Page 1 of 1

Zoom specified axis from custom axis list by mouse wheel

Posted: Wed Jun 25, 2014 9:43 am
by 15666633
Hi, i have multiple vertical custom axes, and i want to have ability to zoom one axis( plot ) via mouse wheel by setting mouse pointer to this axis and rolling the wheel. I implemented zooming via mouse wheel for all axes, so i dont have a problem with zooming, but i would like to know, is there any standart way to determine which axis is selected now( like MouseEnter event ). In axis scroll tool TeeChart determines the axis to be scrolled, so in some way it's implemented, but i couldn't find same public method. What can you recomend me?

Re: Zoom specified axis from custom axis list by mouse wheel

Posted: Wed Jun 25, 2014 11:55 am
by narcis
Hi Petr,

I'd probably use Steema.TeeChart.Drawing.Graphics3D.PointInRect(rect, x, y) method. I'd run a loop for all custom axes, where I'd define the rectangle comprised between each horizontal and vertical axes set, using axes IStartPos and IEndPos properties, and would check if the mouse pointer is within the rectangle bounds using PointInRect method.