TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
-
Pw1
- Newbie
- Posts: 3
- Joined: Thu Feb 17, 2011 12:00 am
Post
by Pw1 » Tue Mar 15, 2011 2:26 pm
Hi,
I am trying to use the MouseDown and MouseUp events to reduce the number of data points plotted when rotating. I'm following the example in
http://www.teechart.net/support/viewtop ... eUp#p45733. The problem I encountered is that the MouseUp event is not triggered when the rotate tool is selected.
My code:
Code: Select all
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
tChart1.MouseDown += new MouseEventHandler(tChart1_MouseDown);
tChart1.MouseUp += new MouseEventHandler(tChart1_MouseUp);
}
private void tChart1_MouseDown(object sender, MouseEventArgs e)
{
Console.WriteLine("MouseDown");
}
private void tChart1_MouseUp(object sender, MouseEventArgs e)
{
Console.WriteLine("MouseUp");
}
}
I'm using TeeChart .NET 2010, Visual Studio 2010 running on Windows XP, compiling for target framework ".NET Framework 4".
Is there anyone who can help me solve this problem?
With kind regards,
Paul Wagenaars
-
Sandra
- Site Admin
- Posts: 3132
- Joined: Fri Nov 07, 2008 12:00 am
Post
by Sandra » Wed Mar 16, 2011 1:14 pm
Hello Paul,
I have modified your code:
Code: Select all
public Form1()
{
InitializeComponent();
tChart1.MouseDown += new MouseEventHandler(tChart1_MouseDown);
tChart1.MouseUp += new MouseEventHandler(tChart1_MouseUp);
Steema.TeeChart.Tools.Rotate rot = new Steema.TeeChart.Tools.Rotate(tChart1.Chart);
}
private void tChart1_MouseDown(object sender, MouseEventArgs e)
{
Console.WriteLine("MouseDown");
}
private void tChart1_MouseUp(object sender, MouseEventArgs e)
{
Console.WriteLine("MouseUp");
}
How you can see I have added a Rotate tool in the chart and MouseDown and MouseUp events, works fine for me. Could you check if this code works as you expected?
I hope will helps.
Thanks,
-
Pw1
- Newbie
- Posts: 3
- Joined: Thu Feb 17, 2011 12:00 am
Post
by Pw1 » Thu Mar 17, 2011 6:55 am
Hello Sandra,
Thank you for your response. I forgot to mention that I am using a ChartController. If I click the rotate button on the ChartController and then rotate only the MouseDown event is triggered. If I remove the ChartController and use your code it does work correctly. With only the Steema.TeeChart.Tools.Rotate connected both MouseDown and MouseUp events are triggered.
However, if I use the ChartController only the MouseDown event is triggered. Here is the code I'm using:
Code: Select all
public Form1()
{
InitializeComponent();
tChart1.MouseDown += new MouseEventHandler(tChart1_MouseDown);
tChart1.MouseUp += new MouseEventHandler(tChart1_MouseUp);
Steema.TeeChart.ChartController controller = new Steema.TeeChart.ChartController();
controller.Chart = this.tChart1;
this.Controls.Add(controller);
}
private void tChart1_MouseDown(object sender, MouseEventArgs e)
{
Console.WriteLine("MouseDown");
}
private void tChart1_MouseUp(object sender, MouseEventArgs e)
{
Console.WriteLine("MouseUp");
}
Any help is appreciated.
With kind regards,
Paul Wagenaars
-
Sandra
- Site Admin
- Posts: 3132
- Joined: Fri Nov 07, 2008 12:00 am
Post
by Sandra » Thu Mar 17, 2011 9:30 am
Hello Paul,
You are right. I have added your request in bug list with number [TF02015448]. We try to fix it to next maintenance releases of TeeChart.Net. At the moment, I suggest that use Rotate tool, for solve the problem.
Thanks,
-
Pw1
- Newbie
- Posts: 3
- Joined: Thu Feb 17, 2011 12:00 am
Post
by Pw1 » Fri Mar 18, 2011 7:30 am
Hi,
Ok thank you.
Is there any schedule for when the next maintenance release will be available?
With kind regards,
Paul Wagenaars
-
Sandra
- Site Admin
- Posts: 3132
- Joined: Fri Nov 07, 2008 12:00 am
Post
by Sandra » Fri Mar 18, 2011 10:29 am
Hello Paul,
I can't still provide an estimate date. I recommend you to be aware at
this forum, our
RSS news feed, Steema Software's
twitter or
facebook accounts for new release announcements and what's implemented on them.
Thanks,