/// <summary> /// Add an item to the form. /// </summary> /// <param name="item">The item to add</param> public void AddItem(QuickFormItem item) { _items.Add(item); var ctl = item.GetControls(this); Controls.AddRange(ctl.ToArray()); CurrentOffset += ItemHeight + ItemPadding; }
/// <summary> /// Add an item to the form. /// </summary> /// <param name="item">The item to add</param> /// <returns>This object, for method chaining</returns> public QuickForm Item(QuickFormItem item) { AddItem(item.Name, item); return(this); }
/// <summary> /// Add an item to the form. /// </summary> /// <param name="name">The name of the item</param> /// <param name="item">The item to add</param> private void AddItem(string name, QuickFormItem item) { item.Name = name; _items.Add(item); _flpLayout.Controls.Add(item); }