how to add TextObject into ReportTitle.and display now!
when I add a TextObject item into RepeortTitle. it can be done.
But the TextObject control cannot visible.
when I move other control ,it can be visible.
============== code ================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using FastReport.Design.StandardDesigner;
using FastReport;
namespace FastReportTest
{
public partial class frmDesigner : Form
{
DesignerControl designer = new DesignerControl();
Report report = new Report();
public frmDesigner()
{
InitializeComponent();
this.WindowState = FormWindowState.Maximized;
designer.Dock = DockStyle.Fill;
panel1.Controls.Add(designer);
report.Load(@report.frx);
designer.Report = report;
designer.RefreshLayout();
}
private void button1_Click(object sender, EventArgs e)
{
TextObject text2 = new TextObject();
text2.Name = "Text2";
text2.Text = "test";
text2.Bounds = new RectangleF(0, 0, 100, 20);
text2.ZOrder = 99;
ReportPage p = (ReportPage)report.Pages[0];
p.ReportTitle.Objects.Add(text2);
// here are problem
}
private void frmDesigner_Load(object sender, EventArgs e)
{
}
}
}
But the TextObject control cannot visible.
when I move other control ,it can be visible.
============== code ================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using FastReport.Design.StandardDesigner;
using FastReport;
namespace FastReportTest
{
public partial class frmDesigner : Form
{
DesignerControl designer = new DesignerControl();
Report report = new Report();
public frmDesigner()
{
InitializeComponent();
this.WindowState = FormWindowState.Maximized;
designer.Dock = DockStyle.Fill;
panel1.Controls.Add(designer);
report.Load(@report.frx);
designer.Report = report;
designer.RefreshLayout();
}
private void button1_Click(object sender, EventArgs e)
{
TextObject text2 = new TextObject();
text2.Name = "Text2";
text2.Text = "test";
text2.Bounds = new RectangleF(0, 0, 100, 20);
text2.ZOrder = 99;
ReportPage p = (ReportPage)report.Pages[0];
p.ReportTitle.Objects.Add(text2);
// here are problem
}
private void frmDesigner_Load(object sender, EventArgs e)
{
}
}
}