Hi Steema Support,
Is it possible to add data grid view (dot net control) or any table layout control, we can add in teechart Rectangle tool as shown in fig. below
It will so helpful for us if you please provide any alternative solution.
Thanks in advance.
Thanks and Regards
Planoresearch
Grid in Rectangle tool
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Grid in Rectangle tool
Amol,
Apologies in the delay in replying. Yesterday was a holiday here.
Yes, you could think of deriving your own class, e.g.
and then using it in your chart, e.g.
Apologies in the delay in replying. Yesterday was a holiday here.
Yes, you could think of deriving your own class, e.g.
Code: Select all
public class MyRectangleTool : RectangleTool
{
public MyRectangleTool() : this((Chart)null)
{
}
public MyRectangleTool(Chart c)
: base(c)
{
DataGridView = new DataGridView();
IChart parent = c.Parent;
if (parent != null)
{
Control control = parent.GetControl();
control.Controls.Add(DataGridView);
}
}
public DataGridView DataGridView
{
get;
set;
}
protected override void ChartEvent(EventArgs e)
{
base.ChartEvent(e);
if (e is BeforeDrawEventArgs)
{
Rectangle newBounds = Bounds;
newBounds.Inflate(-10, -10);
DataGridView.Bounds = newBounds;
}
}
protected override void OnResizing(EventArgs e)
{
base.OnResizing(e);
Rectangle newBounds = Bounds;
newBounds.Inflate(-10, -10);
DataGridView.Bounds = newBounds;
}
}
Code: Select all
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Line line = new Line(tChart1.Chart);
line.FillSampleValues();
MyRectangleTool tool = new MyRectangleTool(tChart1.Chart);
tool.Shape.Transparency = 0;
tool.Width = 100;
tool.Left = 100;
tool.Top = 100;
}
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |