Page 1 of 1

Loop in mouse move event

Posted: Tue Aug 14, 2007 12:50 pm
by 13046133
Hi,

I have a problem with the last version of tee chart
On the mouse move, I executed the following function:

private void tChart1_MouseMove(object sender, MouseEventArgs e)
{
System.Console.Beep(500,500);

hScrollBar1.Size = new Size(this.Width, (int)(0.1 * this.Height));
hScrollBar1.Size = new Size(this.Width, (int)(0.15 * this.Height));
}

And it loops in the mouse move. It doesn't if I comment one of the 2 lines.
My scroll bar is one of the dotnet framework.

Thanks to help me.

Anne-Lise

Posted: Tue Aug 14, 2007 1:51 pm
by narcis
Hi Anne-Lise,

This works fine for me here either commenting in one or two lines of the scroll-bar code. I'm using TeeChart for .NET v3 Build 3.2.2763.26082 from 27th July 2007. Is that the version you are using? If not, could you please try using this version?

Thanks in advance.

Posted: Tue Aug 14, 2007 3:09 pm
by 13046133
Hi,

I didn't have the same version (I had the 32.2746.19160) but I Downloaded it, and I have the same problem.
If I don't comment any line of the code, when the mouse move on the chart we enter in the mouse move function (it is Ok), and then if the mouse stops moving, but staying on the chart, we stay looping in the function as if the mouse was moving...so you can hear the continuous beep. It is not the case commenting one of the 2 lines.
The loop is broken only when the mouse leave the chart.
The problem is while looping in the function, other events like a "TimerTick" are not fired...

Thanks to help me If you can reproduce the problem.

Anne-Lise

Posted: Thu Aug 16, 2007 9:49 am
by narcis
Hi Anne-Lise,

Thanks for the information.

Now I see the problem here. When having both lines uncommented, the scrollbar is being endlessly being resized at 2 different ratios. Therefore Teechart is also being endlessly resized and considers the mouse being moved on it and thus the MouseMove event being fired.