ColorLine tool different styles
Posted: Thu Jun 28, 2007 10:58 am
I managed to use the ColorLine tool to solve my problem of having a tool with different colors (see below). I set AllowDrag to false to stop the tools moving or disappearing when zooming or panning. However I'm still having a problem setting different line styles for the ColorLine tool - all lines seemed to just have a plain style
e.g. :
clNewLine.Pen.Style = System.Drawing.Drawing2D.DashStyle.DashDotDot; has no effect.
Can anyone help?
jenb
With the Active X control I was able to use a drawline tool and add lines with different colors and styles at runtime.
Now when I add additional lines all previous lines are changed to the latest color and style. Is it possible to display a drawline tool owning lines with different colors and styles? Please give me some clues if possible.
Example code is below:
private Steema.TeeChart.Tools.DrawLine _tcAugerPeakLine;
_tcAugerPeakLine = new Steema.TeeChart.Tools.DrawLine(_tcChart.Chart);
Steema.TeeChart.Tools.DrawLineItem dlNewLine = new Steema.TeeChart.Tools.DrawLineItem(_tcAugerPeakLine);
dlNewLine.StartPos.X = dEnergy;
dlNewLine.StartPos.Y = 0;
dlNewLine.EndPos.X = dEnergy;
dlNewLine.EndPos.Y = dYMax;
dlNewLine.Pen.Visible = _tsbXScale.Checked;
dlNewLine.Pen.Color = _colStore.GetElemColor(strElem);
// Set the pen style of the line according to the intensity level
switch ((int)eIntLevel)
{
case (int)EntityObjects.eIntensityLevel.eHigh:
dlNewLine.Pen.Style = System.Drawing.Drawing2D.DashStyle.Dash;
break;
Regards
jenb
e.g. :
clNewLine.Pen.Style = System.Drawing.Drawing2D.DashStyle.DashDotDot; has no effect.
Can anyone help?
jenb
With the Active X control I was able to use a drawline tool and add lines with different colors and styles at runtime.
Now when I add additional lines all previous lines are changed to the latest color and style. Is it possible to display a drawline tool owning lines with different colors and styles? Please give me some clues if possible.
Example code is below:
private Steema.TeeChart.Tools.DrawLine _tcAugerPeakLine;
_tcAugerPeakLine = new Steema.TeeChart.Tools.DrawLine(_tcChart.Chart);
Steema.TeeChart.Tools.DrawLineItem dlNewLine = new Steema.TeeChart.Tools.DrawLineItem(_tcAugerPeakLine);
dlNewLine.StartPos.X = dEnergy;
dlNewLine.StartPos.Y = 0;
dlNewLine.EndPos.X = dEnergy;
dlNewLine.EndPos.Y = dYMax;
dlNewLine.Pen.Visible = _tsbXScale.Checked;
dlNewLine.Pen.Color = _colStore.GetElemColor(strElem);
// Set the pen style of the line according to the intensity level
switch ((int)eIntLevel)
{
case (int)EntityObjects.eIntensityLevel.eHigh:
dlNewLine.Pen.Style = System.Drawing.Drawing2D.DashStyle.Dash;
break;
Regards
jenb