Zoom specified axis from custom axis list by mouse wheel

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Petr
Newbie
Newbie
Posts: 39
Joined: Wed Jul 24, 2013 12:00 am

Zoom specified axis from custom axis list by mouse wheel

Post by Petr » Wed Jun 25, 2014 9:43 am

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?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

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

Post by Narcís » Wed Jun 25, 2014 11:55 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply