Colorline mouse pointer

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Janne
Newbie
Newbie
Posts: 24
Joined: Mon Oct 08, 2007 12:00 am

Colorline mouse pointer

Post by Janne » Mon Jan 28, 2008 3:00 pm

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.

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

Post by Narcís » Mon Jan 28, 2008 3:27 pm

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

Janne
Newbie
Newbie
Posts: 24
Joined: Mon Oct 08, 2007 12:00 am

Workaround

Post by Janne » Tue Jan 29, 2008 7:23 am

Hi Narcis,

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

Thanks in advance!

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 Jan 29, 2008 10:45 am

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;
			}
		}
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