public EditObject AddObject(string caption, IConfiguration configuration) { EditObject obj = this.AddObject(caption); obj.ObjectGrid.SelectedObject = configuration; obj.Configuration = configuration; obj.ObjectGrid.Width = obj.ObjectGrid.Width; return(obj); }
//Add an object to the panel public EditObject AddObject(string caption) { EditObject obj = new EditObject(); obj.BackColor = Color.Transparent; obj.Caption = caption; obj.Dock = DockStyle.Top; obj.ContainerPanel = this; this.objectsContainer.Panel2.Controls.Add(obj); editObjects.Add(obj); this.ActiveEditObject = obj; return(obj); }
//Add an object to the panel public EditObject AddObject(string caption) { EditObject obj = new EditObject(); obj.BackColor = Color.Transparent; obj.Caption = caption; obj.Dock = DockStyle.Top; obj.ContainerPanel = this; this.objectsContainer.Panel2.Controls.Add(obj); editObjects.Add(obj); this.ActiveEditObject = obj; return obj; }