private void button1_Click(object sender, System.EventArgs e) { Steema.TeeChart.Editors.LegendEditor lEdit = new Steema.TeeChart.Editors.LegendEditor(tChart1.Chart, extraLegend1.Legend, null); Steema.TeeChart.Editors.EditorUtils.Translate(lEdit); Steema.TeeChart.Editors.EditorUtils.ShowFormModal(lEdit); }
/// <summary> /// User has selected a node in the tree - display an editor for it. /// </summary> private void OnTreeNodeSelect(object sender, TreeViewEventArgs e) { PropertyPanel.Controls.Clear(); Form f; if (e.Node.Text == "Chart") { f = new Steema.TeeChart.Editors.GeneralEditor(Chart.Chart.Chart, PropertyPanel); } else if (e.Node.Text == "Panel") { f = new Steema.TeeChart.Editors.PanelEditor(Chart.Chart.Panel, PropertyPanel); } else if (e.Node.Text == "Left") { f = new Steema.TeeChart.Editors.AxisEditor(Chart.Chart.Axes.Left, PropertyPanel); } else if (e.Node.Text == "Top") { f = new Steema.TeeChart.Editors.AxisEditor(Chart.Chart.Axes.Top, PropertyPanel); } else if (e.Node.Text == "Right") { f = new Steema.TeeChart.Editors.AxisEditor(Chart.Chart.Axes.Right, PropertyPanel); } else if (e.Node.Text == "Bottom") { f = new Steema.TeeChart.Editors.AxisEditor(Chart.Chart.Axes.Bottom, PropertyPanel); } else if (e.Node.Text == "Titles") { f = new Steema.TeeChart.Editors.TitleEditor(Chart.Chart.Chart, PropertyPanel); } else if (e.Node.Text == "Left wall") { f = new Steema.TeeChart.Editors.WallEditor(Chart.Chart.Walls.Left, PropertyPanel); } else if (e.Node.Text == "Right wall") { f = new Steema.TeeChart.Editors.WallEditor(Chart.Chart.Walls.Right, PropertyPanel); } else if (e.Node.Text == "Back wall") { f = new Steema.TeeChart.Editors.WallEditor(Chart.Chart.Walls.Back, PropertyPanel); } else if (e.Node.Text == "Bottom wall") { f = new Steema.TeeChart.Editors.WallEditor(Chart.Chart.Walls.Bottom, PropertyPanel); } else if (e.Node.Text == "Legend") { f = new Steema.TeeChart.Editors.LegendEditor(Chart.Chart.Chart, PropertyPanel); } else if (e.Node.Text == "3D") { f = new Steema.TeeChart.Editors.AspectEditor(Chart.Chart.Chart, PropertyPanel); } // else if (e.Node.Text == "Tools") // f = new Steema.TeeChart.Editors.Tools.ToolsEditor(Chart.Chart.Chart, PropertyPanel); else if (e.Node.Text == "Themes") { f = new Steema.TeeChart.Editors.ThemeEditor(Chart.Chart.Chart, PropertyPanel); } else if (e.Node.Parent == Tree.Nodes[0].Nodes[0]) { // series node. Series S = Chart.Chart.Series.WithTitle(e.Node.Text); f = new Steema.TeeChart.Editors.SeriesEditor(S, PropertyPanel); TabControl TabControl1 = (TabControl)f.Controls[0]; TabControl1.TabPages.RemoveByKey("TabSource"); } else { f = null; } if (f != null) { f.Parent = PropertyPanel; f.Dock = DockStyle.Fill; f.Show(); } }