Page 1 of 1

CursorTool issue with TeeChart May 2012 release

Posted: Tue May 22, 2012 3:30 pm
by 15660231
Hi,

I'm noticing a strange behavior in TeeChart 2012 (May release), when using CursorTool.
If we set the XValue property from code, the CursorTool_Change event is not getting fired. This was working fine in earlier releases and now this is creating a lot of problems in our existing code after upgradation.

Any other new Setting/Property is included in this version to control this ? Or this is a bug ?
Please advise me on this as early as possible.

Thanks.

Re: CursorTool issue with TeeChart May 2012 release

Posted: Tue May 22, 2012 3:43 pm
by 15660231
To Add to this, using custom mouse cursors in code is also not working. This was also working fine in earlier version. Because of this the whole behavior of our application is getting affected now. Don't what else is missing from the previous version.

Re: CursorTool issue with TeeChart May 2012 release

Posted: Wed May 23, 2012 2:17 pm
by 10050769
Hello Arthur Dunn,

I can not reproduce your problem using last version of TeeChartFor.Net and next code:

Code: Select all

     private Steema.TeeChart.Styles.FastLine fastLine1;
        private Steema.TeeChart.Tools.CursorTool cursor1;
        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            cursor1 = new CursorTool(tChart1.Chart);
            cursor1.Style = CursorToolStyles.Vertical;
            cursor1.Change += new CursorChangeEventHandler(cursor1_Change);
            fastLine1 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
            fastLine1.LinePen.Width = 2;
            fastLine1.FillSampleValues(20);
            cursor1.XValue = 8;
            cursor1.XValue = 8;
            cursor1.FollowMouse = true;
            tChart1.Draw();
        }

        void cursor1_Change(object sender, CursorChangeEventArgs e)
        {
            this.Text = cursor1.XValue.ToString();
           
        }
Can you modify my previous code, because we can reproduce your problem here?

Thanks,

Re: CursorTool issue with TeeChart May 2012 release

Posted: Thu May 24, 2012 6:12 am
by 15660231
Hi Sandra,

Here is the modified code:

Code: Select all

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Steema.TeeChart.Tools;

namespace SampleTrend
{
	public partial class Form7 : Form
	{
		private Steema.TeeChart.Styles.FastLine fastLine1;
		private Steema.TeeChart.Tools.CursorTool cursor1;
		public Form7()
		{
			InitializeComponent();
			InitializeChart();
			tChart1.MouseDown += Form7_MouseDown;
		}
		
		private void InitializeChart()
		{
			tChart1.Aspect.View3D = false;
			cursor1 = new CursorTool(tChart1.Chart);
			cursor1.Style = CursorToolStyles.Vertical;
			cursor1.Change += new CursorChangeEventHandler(cursor1_Change);
			fastLine1 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
			fastLine1.LinePen.Width = 2;
			fastLine1.FillSampleValues(20);
			cursor1.XValue = 8;
			
			// I dont want follow mouse
			cursor1.FollowMouse = false;
			tChart1.Draw();
		}

		void cursor1_Change(object sender, CursorChangeEventArgs e)
		{
			this.Text = cursor1.XValue.ToString();
		}

		private void Form7_MouseDown(object sender, MouseEventArgs e)
		{
			// This is about setting the mouse cursor; this is also not working
			tChart1.Cursor = Cursors.Hand;

			//This should fire the cursor1_Change event; This works perfectly with the TeeChart 2011 version
			cursor1.XValue = tChart1.Axes.Bottom.CalcPosPoint(e.X);
		}
	}
}

This is not working properly. Please try to execute the same code with Tecchart 2011, so that you can find the difference.
Thanks.

Re: CursorTool issue with TeeChart May 2012 release

Posted: Thu May 24, 2012 3:54 pm
by 10050769
Hello Arthur Dunn,

I inform you I can reproduce your problem and I have added it in bug list report with number[TF02016199].We try to fix it for next maintenance releases of TeeChartFor.Net.

Thanks,

Re: CursorTool issue with TeeChart May 2012 release

Posted: Mon May 28, 2012 5:10 am
by 15660231
Hi Sandra,

Thanks for you reply.
We desperately waited for a different fix [TF02016114], in this release. But because of this new problem we are pushed to make use of the old TeeChart version for our release. Is there any chance, that a hot fix can be provided for this issue as early as possible ?

Re: CursorTool issue with TeeChart May 2012 release

Posted: Mon May 28, 2012 9:21 am
by 10050769
Hello Arthur Dunn,

At the moment, the only solution that you can use to solve your problem is set Cursor.FollowMouse to true, without using MouseMove Event as do in next sample code:

Code: Select all

        public Form1()
        {
            InitializeComponent();
            InitializeChart();
            tChart1.MouseMove  = new MouseEventHandler(tChart1_MouseMove);
        }

      private Steema.TeeChart.Styles.FastLine fastLine1;
      private Steema.TeeChart.Tools.CursorTool cursor1;
      
      private void InitializeChart()
      {
         tChart1.Aspect.View3D = false;
         cursor1 = new CursorTool(tChart1.Chart);
         cursor1.Style = CursorToolStyles.Vertical;
         cursor1.Change  = new CursorChangeEventHandler(cursor1_Change);
         fastLine1 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
         fastLine1.LinePen.Width = 2;
         fastLine1.FillSampleValues(2000);
         cursor1.XValue = 8;
         // I dont want follow mouse
         cursor1.FollowMouse = true;
         tChart1.Cursor = Cursors.Hand;  
         tChart1.Draw();
      }

      void cursor1_Change(object sender, CursorChangeEventArgs e)
      {
         this.Text = cursor1.XValue.ToString();
      }
If next code doesn't like you, can you please explain us why cannot you use FollowMouse and what do you want achieve? So we can try to find a workaround works in your end. On the other hand, I inform you that I have set the severity of the bug to serious and would be treat asap.

Thanks,

Re: CursorTool issue with TeeChart May 2012 release

Posted: Wed Jul 11, 2012 8:01 am
by 10050769
Hello Arthur Dunn,

I inform you that, after revising the bug with number [TF02016199] we consider it as not a bug,because, The reason is that you need use MouseDown and your initial code was because of a defect in the CursorTool, whereby the Cursor shape (hand etc.) changed every time the mouse was moved using FollowMouse.The defecte was fixed and it change the behavior of Cursor Tool, that now works in its end and the correct way to achieve as you want is using FollowMouse.

Thanks,