Page 1 of 1

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

Posted: Tue Feb 17, 2009 9:09 am
by 13050364
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

Posted: Tue Feb 17, 2009 10:51 am
by yeray
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;

Posted: Tue Feb 17, 2009 11:48 am
by 13050364
Excellent. Thanks Yeray