Page 1 of 1

Colorline mouse pointer

Posted: Mon Jan 28, 2008 3:00 pm
by 13046960
I have a problem when adding a colorline tool to my tchart.
When I move the mouse over the colorline the cursor changes to a different cursor icon and will not change back even if i do not drag the line.

Posted: Mon Jan 28, 2008 3:27 pm
by narcis
Hi Janne,

Thanks for reporting. I could reproduce the issue here and added it (TF02012777) to our defect list to be fixed for future releases.

Workaround

Posted: Tue Jan 29, 2008 7:23 am
by 13046960
Hi Narcis,

Thanks for your reply.
I really need to solve this issue, do you have any workaround for this problem?

Thanks in advance!

Posted: Tue Jan 29, 2008 10:45 am
by narcis
Hi Janne,

Yes, a workaround is setting chart's cursor in the MouseMove event like this:

Code: Select all

		private Steema.TeeChart.Tools.ColorLine colorLine1;

		public Form1()
		{
			InitializeComponent();
			InitializeChart();
		}

		private void InitializeChart()
		{
			tChart1.Aspect.View3D = false;

			Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
			line1.FillSampleValues();

			colorLine1 = new Steema.TeeChart.Tools.ColorLine(tChart1.Chart);
			colorLine1.Axis = tChart1.Axes.Left;
			colorLine1.Value = (line1.MinYValue() + line1.MaxYValue()) / 2;

			tChart1.MouseMove += new MouseEventHandler(tChart1_MouseMove);
		}

		void tChart1_MouseMove(object sender, MouseEventArgs e)
		{
			if (colorLine1.Axis.CalcPosPoint(e.Y) == colorLine1.Value)
			{
				tChart1.Cursor = Cursors.HSplit;	
			}
			else
			{
				tChart1.Cursor = Cursors.Default;
			}
		}