How Do I change the Width and Make Dashed a Vertical Cursor?

TeeChart for ActiveX, COM and ASP
Post Reply
Dave
Advanced
Posts: 139
Joined: Mon Sep 22, 2008 12:00 am

How Do I change the Width and Make Dashed a Vertical Cursor?

Post by Dave » Tue Feb 17, 2009 9:09 am

Hi

Ive just started working with TeeChart so Im a bit green round the ears. Ive added a cursor (a vertical line) as follows;

mainCursor = new Steema.TeeChart.Tools.CursorTool(theChart.Chart);
mainCursor.FollowMouse = true;
mainCursor.Style = Steema.TeeChart.Tools.CursorToolStyles.Vertical;
mainCursor.FastCursor = true;
mainCursor.Pen.Width = 25;
mainCursor.Pen.Color = Color.Turquoise;


However Id like to make the vertical line wider. How do I do this? (I notice that changing the value of mainCursor.Pen.Width is having no effect)

Also Id like to make the line dashed. Any ideas how I do this?

Thanks

Doug

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Tue Feb 17, 2009 10:51 am

Hi Dave,

The FastCursor feature disables the pen width so, if you want width and dash, you could do as follows:

Code: Select all

mainCursor.FollowMouse = true;
mainCursor.Style = Steema.TeeChart.Tools.CursorToolStyles.Vertical;
//mainCursor.FastCursor = true;
mainCursor.Pen.Width = 5;
mainCursor.Pen.Color = Color.Turquoise;
mainCursor.Pen.Style = System.Drawing.Drawing2D.DashStyle.Dash;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Dave
Advanced
Posts: 139
Joined: Mon Sep 22, 2008 12:00 am

Post by Dave » Tue Feb 17, 2009 11:48 am

Excellent. Thanks Yeray

Post Reply