Hi Support,
I hope I'm missing something here!
I have a main chart which has an added SubChartTool in the main chart tool collection and a sub chart is added to the SubChartTool.
My problem is that the sub chart does not seem to get any mouse event (eg MouseMove or MouseDown) while the main chart does. For example, if I click on the main chart the main chart gets a MouseDown event (expected) where as if I click on a sub chart the main chart gets a MouseDown event and the sub chart does not. I would have expected at least both charts to get the mouse event but preferably only the chart which is clicked on.
Is this a defect or have I got something wrong?
BTW. My real problem is that a CursorTool was added to the sub chart but it would not follow the mouse movements in the sub chart. Hence the above comments and investigation into mouse events.
thanks
Mark
No Mouse events in SubChart
Re: No Mouse events in SubChart
Hi Mark,
Yes, the mouse events aren't fired in the SubChartTool charts. I've checked it for the Click, MouseDown, MouseUp and MouseMove events.
On the other hand, AfterDraw and Zoomed seem to work fine.
I've added it to the wish list to be implemented in future releases (TF02014771).
Anyway, you can move the cursor manually using the "parent" chart mouse events:
Yes, the mouse events aren't fired in the SubChartTool charts. I've checked it for the Click, MouseDown, MouseUp and MouseMove events.
On the other hand, AfterDraw and Zoomed seem to work fine.
I've added it to the wish list to be implemented in future releases (TF02014771).
Anyway, you can move the cursor manually using the "parent" chart mouse events:
Code: Select all
public Form1()
{
InitializeComponent();
CreateChart();
CreateSubChart();
InitializeChart();
InitializeSubChart();
}
private Steema.TeeChart.TChart tChart1; //Chart1
private Steema.TeeChart.TChart tChart2; //SubChart - Chart2
private Steema.TeeChart.Commander chartController1;
private Steema.TeeChart.Tools.CursorTool cursor1;
private Boolean DragCursor;
private void CreateChart()
{
tChart1 = new Steema.TeeChart.TChart();
this.Controls.Add(tChart1);
chartController1 = new Steema.TeeChart.Commander();
this.Controls.Add(chartController1);
chartController1.Chart = tChart1;
tChart1.Dock = DockStyle.Fill;
}
private void CreateSubChart()
{
Steema.TeeChart.Tools.SubChartTool subchart1 = new Steema.TeeChart.Tools.SubChartTool(tChart1.Chart);
tChart2 = subchart1.Charts.AddChart("Chart2");
tChart2.Width = tChart1.Width / 2;
tChart2.Height= tChart1.Height / 2;
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
new Steema.TeeChart.Styles.Points(tChart1.Chart);
tChart1[0].FillSampleValues(5);
tChart1.MouseDown += new MouseEventHandler(tChart1_MouseDown);
tChart1.MouseUp += new MouseEventHandler(tChart1_MouseUp);
tChart1.MouseMove += new MouseEventHandler(tChart1_MouseMove);
}
private void InitializeSubChart()
{
tChart2.Aspect.View3D = false;
new Steema.TeeChart.Styles.Line(tChart2.Chart);
tChart2[0].FillSampleValues(5);
cursor1 = new Steema.TeeChart.Tools.CursorTool(tChart2.Chart);
cursor1.Style = Steema.TeeChart.Tools.CursorToolStyles.Vertical;
cursor1.Pen.Color = Color.Green;
tChart1.Draw();
cursor1.XValue = 2;
DragCursor = false;
}
void tChart1_MouseDown(object sender, MouseEventArgs e)
{
if (cursor1.Clicked(e.X,e.Y) == Steema.TeeChart.Tools.CursorClicked.Vertical)
DragCursor = true;
}
void tChart1_MouseUp(object sender, MouseEventArgs e)
{
DragCursor = false;
}
void tChart1_MouseMove(object sender, MouseEventArgs e)
{
if (DragCursor)
cursor1.XValue = cursor1.GetHorizAxis.CalcPosPoint(e.X);
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: No Mouse events in SubChart
Hi Yeray,
In the release notes for the latest release 4.0.2010.13050 I note that this defect [TF02014771] has not been fixed. This is disappointing. In fact there was very little in the release to encourage me to update our custom build of TChart
Would it be possible to issue me with a private fix for this defect?
regards
Mark
In the release notes for the latest release 4.0.2010.13050 I note that this defect [TF02014771] has not been fixed. This is disappointing. In fact there was very little in the release to encourage me to update our custom build of TChart
Would it be possible to issue me with a private fix for this defect?
regards
Mark
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: No Mouse events in SubChart
Hi Mark,
We will work to identify a solution to this problem and can send you pre-release code for testing when available.
We will work to identify a solution to this problem and can send you pre-release code for testing when available.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: No Mouse events in SubChart
Hi Narcis,
great! I (and our customer) will look forward to getting it.
regards
Mark
great! I (and our customer) will look forward to getting it.
regards
Mark
Re: No Mouse events in SubChart
Hi Mark,
I've just sent you a mail to your registered mail with the fix for the OnMouseMove, OnMouseDown and OnMouseUp events in the SubChartTool (TF02014771).
I've just sent you a mail to your registered mail with the fix for the OnMouseMove, OnMouseDown and OnMouseUp events in the SubChartTool (TF02014771).
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: No Mouse events in SubChart
Hi Yeray,
sorry for the delay I've been involved with other work.
I don't appear to have the email would you mind sending it again. Thankyou.
regards
Mark
sorry for the delay I've been involved with other work.
I don't appear to have the email would you mind sending it again. Thankyou.
regards
Mark
Re: No Mouse events in SubChart
Hi Mark,
I sent it to your partner Luke, that is the registered mail into this forum.
I think I found your mail. Could you please check it again?
I sent it to your partner Luke, that is the registered mail into this forum.
I think I found your mail. Could you please check it again?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: No Mouse events in SubChart
Hi Yeray,
got it. Thanks.
I will post back when I have had a chance to use the code.
regards
Mark
got it. Thanks.
I will post back when I have had a chance to use the code.
regards
Mark