Looking at the source code for TeeChart.dll version 3.2.3016.15521, I find
Code: Select all
public override int Clicked(int x, int y)
{
if (chart != null) chart.graphics3D.Calculate2DPosition(ref x, ref y, StartZ);
int result = base.Clicked(x, y);
if ((result == -1) && (firstVisible > -1) && (lastVisible > -1))
for (int t = firstVisible; t <= lastVisible; t++)
if (ClickedPointer(t, CalcXPos(t), CalcYPos(t), x, y))
{
OnClickPointer(t, x, y);
return t;
}
return result;
}
I guess the thing that seems wrong here is why is a click event firing when I have not clicked on anything. It is clear by the call stack below that the series of method calls is initiated by a mouse over event. That appears to be a problem because it ends up calling a mouse click event that is not quite ready. I did verify that if I keep the mouse out of the area in which it is drawing, I do not get the exception.
Stack trace:
TeeChart.dll!Steema.TeeChart.Styles.ValueList.this[int].get(int index = 0) Line 515 + 0xd bytes C#
TeeChart.dll!Steema.TeeChart.Styles.Series.CalcXPos(int index = 0) Line 2792 + 0xe bytes C#
TeeChart.dll!Steema.TeeChart.Styles.CustomPoint.CalcXPos(int valueIndex = 0) Line 1329 + 0x9 bytes C#
TeeChart.dll!Steema.TeeChart.Styles.CustomPoint.Clicked(int x = 269, int y = 157) Line 1373 + 0x12 bytes C#
TeeChart.dll!Steema.TeeChart.Tools.MarksTip.FindClickedSeries(int x = 269, int y = 157, ref int index = -1) Line 157 + 0x33 bytes C#
> TeeChart.dll!Steema.TeeChart.Tools.MarksTip.MouseEvent(Steema.TeeChart.MouseEventKinds kind = Move, System.Windows.Forms.MouseEventArgs e = {X = 269 Y = 157 Button = None}, ref System.Windows.Forms.Cursor c = {[Cursor: Default]}) Line 203 + 0x25 bytes C#
TeeChart.dll!Steema.TeeChart.Chart.BroadcastMouseEvent(Steema.TeeChart.MouseEventKinds kind = Move, System.Windows.Forms.MouseEventArgs e = {X = 269 Y = 157 Button = None}, ref System.Windows.Forms.Cursor c = {[Cursor: Default]}) Line 1190 + 0x28 bytes C#
TeeChart.dll!Steema.TeeChart.Chart.BroadcastMouseEvent(Steema.TeeChart.MouseEventKinds kind = Move, System.Windows.Forms.MouseEventArgs e = {X = 269 Y = 157 Button = None}, System.Windows.Forms.Keys modKeys = None) Line 1174 + 0x12 bytes C#
TeeChart.dll!Steema.TeeChart.TChart.OnMouseMove(System.Windows.Forms.MouseEventArgs e = {X = 269 Y = 157 Button = None}) Line 1381 + 0x25 bytes C#
Code: Select all