/// <summary> /// Remove an Item from this DisplayItem /// </summary> /// <param name="control">A Control to be removed</param> public void RemoveItem(Control control) { // don't fail if an unknown obj is tried to be removed try { var c = this.Controls[this.Controls.IndexOf(control)]; GUI_Colors.Unregister(c as IColorType); // we checked this on arrival - should have that IF anyway this.Controls.Remove(control); control.Dispose( ); } catch { } }
/// <summary> /// cTor: Create an item /// </summary> public DispItem( ) { this.FlowDirection = FlowDirection.LeftToRight; this.WrapContents = false; this.AutoSize = true; this.AutoSizeMode = AutoSizeMode.GrowAndShrink; this.Anchor = AnchorStyles.Left | AnchorStyles.Bottom; this.Dock = DockStyle.Bottom; this.Cursor = Cursors.Default; // avoid the movement cross on the item controls this.BackColor = GUI_Colors.ItemColor(GUI_Colors.ColorType.cBG); // default (should be transparent - ex. for debugging) this.TabStop = false; #if DEBUG // this.BackColor = Color.SteelBlue; // DEBUG color //this.BorderStyle = BorderStyle.FixedSingle; // DEBUG #endif }