Hi,
In my application I have my own .NET font dialog, and I want to apply the user-selected font for my axis titles. (kinda shortcut for TeeChart editor).
But I get an error message : cannot convert System.Drawing.Font to Steema.TeeChart.Drawing.ChartFont ???
My code looks like:
Steema.TeeChart.Axis axis;
fontDialog = new FontDialog();
if(fontDialog.ShowDialog() != DialogResult.Cancel )
{
axis.Title.Font = fontDialog.Font;
}
Also an explicit cast does not work here.
Are the .NET and TeeChart fonts incompatible ??
Last question ... in your TeeChart editor, the edited title is changed immediately. How to do that .. simply an tChart1.Invalidate() ?
Thanks a lot.
Antoon Koster
Netherlands
Are .NET fonts and TeeChart fonts incompatible ?
Hi Anthony,
tChart1.Axes.Bottom.Title.Font.Name = fontDialog1.Font.Name;
You can't assign the font directly (as you did), because the Font property is "read-only", you must assign is as in the following line :But I get an error message : cannot convert System.Drawing.Font to Steema.TeeChart.Drawing.ChartFont ???
tChart1.Axes.Bottom.Title.Font.Name = fontDialog1.Font.Name;
I'm not sure what you refer, changing the text of the title. it should change automatically. Also, doing a Invalidate will repaint the Chart.Last question ... in your TeeChart editor, the edited title is changed immediately. How to do that .. simply an tChart1.Invalidate() ?
Pep Jorge
http://support.steema.com
http://support.steema.com