CursorTools are displayed outside the chart area

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
zema
Newbie
Newbie
Posts: 30
Joined: Tue Nov 15, 2005 5:00 am

CursorTools are displayed outside the chart area

Post by zema » Tue Feb 06, 2007 3:43 pm

When CursorTool is displayed, and you move the chart (using right mouse button) in horizontal direction, CursorTool continues to display outside the chart field.

TeeChart v2.0.2586.24039 for .Net 2.0, from Jan, 30.

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 Feb 06, 2007 4:41 pm

Hi rvs,

You can solve this problem doing something like this:

Code: Select all

private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
		{
			UpdateCursor();
		}

		private void UpdateCursor()
		{
			if ((cursorTool1.XValue < tChart1.Axes.Bottom.Minimum) || (cursorTool1.XValue > tChart1.Axes.Bottom.Maximum)
					 || (cursorTool1.YValue < tChart1.Axes.Left.Minimum) || (cursorTool1.YValue > tChart1.Axes.Left.Maximum))
			{
				cursorTool1.Active = false;
			}
			else
			{
				cursorTool1.Active = true;
			}
		}
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