Page 1 of 1

Color Editor at RunTime

Posted: Fri Oct 20, 2006 9:27 pm
by 9527696
Hello,

The CPen1::ShowEditor() doesn't seem to be working for me. I've tried both of the following scenarios:

Code: Select all

  CSeries     series     = pChartData->Series(iCurrentSel);
  CLineSeries lineSeries = series.GetAsLine();
  CPen1       pen        = lineSeries.GetLinePen();
  pen.ShowEditor();

...

  CSeries series = pChartData->Series(iCurrentSel);
  CPen1   pen    = series.GetPen();
  pen.ShowEditor();

I can successfully change the "Visible", "Style", and "Width" properties, but not the color.

Also, the Caption in the editor is "Border Editor". Is there a way that I can manually change the name of the dialog box, so that it matches the name of the series that the user is modifying?

Thank you for any help,

Jennifer Britt
Campbell Scientific

Posted: Mon Oct 30, 2006 12:00 am
by Pep
Hi Jennifer,

which TeeChart Pro version are you using ? I've just tried here with the latest v7.012 and the following code worked fine :

Code: Select all

void CPenEditorDlg::OnButton1() 
{
    CSeries     series     = m_chart.Series(0); 
    CLineSeries lineSeries = series.GetAsLine(); 
	CPen1       pen        = m_chart.Series(0).GetAsLine().GetLinePen(); 
	pen.ShowEditor();
}
Also, the Caption in the editor is "Border Editor". Is there a way that I can manually change the name of the dialog box, so that it matches the name of the series that the user is modifying?
There's not a way to change it in the existing version, however I've added this feature on our wish list to be considered for further releases.