Page 1 of 1
Axis arrow tool disable zoom
Posted: Tue Aug 26, 2008 9:23 am
by 13047613
Hi,
I have a problem with axis arrow tools:
When I enable this tool with .Active = true, i can't make a zoom with mouse on chart region, the zoom in code work but not with mouse selection.
How can I do that?
Thanks in advance.
Mat
Posted: Tue Aug 26, 2008 9:26 am
by narcis
Hi Mat,
Code below works fine for me here using latest TeeChart for .NET v3 maintenance release.
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line1.FillSampleValues();
Steema.TeeChart.Tools.AxisArrow arrow1 = new Steema.TeeChart.Tools.AxisArrow(tChart1.Axes.Bottom);
arrow1.Active = true;
}
Could you please let us know the exact version you are using and modify the code snippet so that we can reproduce the problem here?
Thanks in advance.
Axis arrow tool disable zoom
Posted: Tue Aug 26, 2008 9:55 am
by 13047613
Hi,
I find my error: I need to detect when the user move the axis to refresh a grid and to do that, i handle the click event to refresh grid.
But if I do that, the zoom doesn't work.
Is there a way to catch other event?
Thanks
Posted: Tue Aug 26, 2008 10:05 am
by narcis
Hi Mat,
Yes, I can think of several idea:
1. Try using KeyShift for zooming:
http://www.teechart.net/support/viewtopic.php?t=662
2. Try checking the mouse button used for refreshing the grid in the mouse event, using a different mouse button than the one used for zooming.
3. Check if axis scale has changed in the AfterDraw event and if so refresh the grid. That way you won't need any mouse input for that and therefore functionality won't "collide".
Hope this helps!