using System; using System.Collections.Generic; using System.Text; using System.Collections; using FastReport.Utils; namespace FastReport.Table { /// /// Represents a collection of objects. /// public class TableColumnCollection : FRCollectionBase { /// /// Gets a column with specified index. /// /// Index of a column. /// The column with specified index. public TableColumn this[int index] { get { TableColumn column = List[index] as TableColumn; column.SetIndex(index); return column; } } /// protected override void OnInsert(int index, object value) { base.OnInsert(index, value); if (Owner != null) (Owner as TableBase).CorrectSpansOnColumnChange(index, 1); } /// protected override void OnRemove(int index, object value) { base.OnRemove(index, value); if (Owner != null) (Owner as TableBase).CorrectSpansOnColumnChange(index, -1); } internal TableColumnCollection(Base owner) : base(owner) { } } }