Hi,
Is it possible to catch mouse wheel event? If I can, I would like to use this event for zooming in and out rather than scrolling up and down.
dalshin
Mouse wheel event
Re: Mouse wheel event
Hi dalshin,
If you can catch the MouseWheel event in your IDE, you can catch it for the TeeChart control. For example, in VS2008:
If you can catch the MouseWheel event in your IDE, you can catch it for the TeeChart control. For example, in VS2008:
Code: Select all
private void InitializeChart()
{
axTChart1.Aspect.View3D = false;
axTChart1.AddSeries(TeeChart.ESeriesClass.scFastLine);
axTChart1.Series(0).FillSampleValues(25);
this.MouseWheel += new MouseEventHandler(Form1_MouseWheel);
}
void Form1_MouseWheel(object sender, MouseEventArgs e)
{
axTChart1.Header.Caption = "mousewheel event";
Rectangle rect = new Rectangle(axTChart1.Location.X, axTChart1.Location.Y, axTChart1.ChartBounds.Right-axTChart1.ChartBounds.Left,axTChart1.ChartBounds.Bottom-axTChart1.ChartBounds.Top);
if (rect.Contains(e.X, e.Y))
{
axTChart1.Header.Caption = axTChart1.Header.Caption + " in chart";
}
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |