Loop in mouse move event

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
annelise
Newbie
Newbie
Posts: 28
Joined: Wed Jul 18, 2007 12:00 am
Contact:

Loop in mouse move event

Post by annelise » Tue Aug 14, 2007 12:50 pm

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

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

Post by Narcís » Tue Aug 14, 2007 1:51 pm

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.
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

annelise
Newbie
Newbie
Posts: 28
Joined: Wed Jul 18, 2007 12:00 am
Contact:

Post by annelise » Tue Aug 14, 2007 3:09 pm

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

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

Post by Narcís » Thu Aug 16, 2007 9:49 am

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.
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