Getting ChartRect.Top and ChartRect.Right ?
Posted: Wed Apr 06, 2005 3:41 pm
Hi,
I want to text out a string on the right top corner of my TeeChart.
Here is how I would have implemented it :
private void afterDrawChart(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
int title_width = (int) mChart.Graphics3D.TextWidth("Mon titre");
int x = mChart.Chart.ChartRect.Right - 4 - title_width;
int y = mChart.Chart.ChartRect.Top + 4;
mChart.Graphics3D.TextOut(100, 100, "Mon titre");
}
But this generates me the following error at compilation time:
D:\C#\TChartRapidity\Form1.cs(153): Cannot pass 'Steema.TeeChart.Chart.ChartRect' as ref or out, because 'Steema.TeeChart.Chart.ChartRect' is a marshal-by-reference class
How can I get the information about chartRect top and right position ?
Thanks by advance,
Verane.
I want to text out a string on the right top corner of my TeeChart.
Here is how I would have implemented it :
private void afterDrawChart(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
int title_width = (int) mChart.Graphics3D.TextWidth("Mon titre");
int x = mChart.Chart.ChartRect.Right - 4 - title_width;
int y = mChart.Chart.ChartRect.Top + 4;
mChart.Graphics3D.TextOut(100, 100, "Mon titre");
}
But this generates me the following error at compilation time:
D:\C#\TChartRapidity\Form1.cs(153): Cannot pass 'Steema.TeeChart.Chart.ChartRect' as ref or out, because 'Steema.TeeChart.Chart.ChartRect' is a marshal-by-reference class
How can I get the information about chartRect top and right position ?
Thanks by advance,
Verane.