public void addItem(PropertyItem item) { item.Location = new Point(dX, dY); dY += item.Height + 4; this.propertyItemList.Add(item); this.Controls.Add(item); }
public void addItem(string name, PropertyType type) { PropertyItem item = new PropertyItem(name, type); item.Location = new Point(dX, dY); dY += item.Height + 4; this.propertyItemList.Add(item); this.Controls.Add(item); }
public override void AddItem(PropertyItem item) { Rectangle newBounds = item.Bounds; if (item.Type != PropertyType.Radio) { MessageBox.Show("Radiobutton Container können nur Radiobuttons hinzugefügt werden"); item.Type = PropertyType.Radio; } this.Controls.Add(item); newBounds.X += change; newBounds.Y += change * Controls.Count; item.Bounds = newBounds; }
public virtual void AddItem(PropertyItem item) { if (this.Type == PropertyType.Container) { Rectangle newBounds = item.Bounds; this.Controls.Add(item); newBounds.X += change; newBounds.Y += change * Controls.Count; item.Bounds = newBounds; } }