public void setChartCounts(int anum_charts_x, int anum_charts_y) { num_charts_x = anum_charts_x; num_charts_y = anum_charts_y; num_charts = num_charts_x * num_charts_y; this.SuspendLayout(); this.Controls.Clear(); charts = new MultiChart2D[num_charts]; for (int i = 0; i < num_charts; ++i) { charts[i] = new MultiChart2D(); charts[i].Location = new Point(0, 0); charts[i].Name = "Chart" + i; charts[i].Size = new Size(0, 0); charts[i].TabIndex = i; this.Controls.Add(charts[i]); } recalcChartSizes(); this.ResumeLayout(false); }
public static void TestHarness() { MultiChart2D chart = new MultiChart2D(); chart.doSampleChart(); SingleControlForm form = new SingleControlForm(); form.setControl(chart); form.ShowDialog(); }