Mouse drag over the Graphs draws a line

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
HQO
Newbie
Newbie
Posts: 25
Joined: Thu Jun 05, 2003 4:00 am
Contact:

Mouse drag over the Graphs draws a line

Post by HQO » Thu Jun 09, 2005 1:55 pm

Hi

I have a graph drawn. The problem is when the user drags the mouse over the graph a line gets drawn which spoils the graph. Is there any was by which i can avoid this

Regards...

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

Post by Narcís » Thu Jun 09, 2005 2:09 pm

Hi HQO,

The defaul chart setting is that if a user clicks a chart with the left mouse button and drags to the right and bottom direction, when the button is released the chart is zoomed. To prevent this behaviour you can use the code above or also block it at the chart editor.

Code: Select all

tChart1.Zoom.Allow=false;
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

HQO
Newbie
Newbie
Posts: 25
Joined: Thu Jun 05, 2003 4:00 am
Contact:

Post by HQO » Thu Jun 09, 2005 2:20 pm

I think I didn't explain it correctly. Even I am using the zoom property. The problem comes when i draw some lines using Steema.TeeChart.Tools.DrawLine method. The lines gets displayed but it becomes movable by user and also user can draw other lines in the graph. I want to avoid this. Please let me know if u have any solution

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

Post by Narcís » Fri Jun 10, 2005 8:28 am

Hi HQO,

Ah, ok :D! Now I understood what you want. Then you can disable lines drawing and being selected using:

Code: Select all

			this.drawLine1.EnableDraw=false;
			this.drawLine1.EnableSelect=false;
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