示例#1
0
        /// <summary>
        /// Add the cell to row.
        /// </summary>
        /// <param name="row">Row.</param>
        protected void AddCellToRow(TableListComponent row)
        {
            var cell = Compatibility.Instantiate(RowCell);

            cell.transform.SetParent(row.transform, false);
            cell.gameObject.SetActive(true);

            row.TextComponents.Add(cell.Text);
            row.UpdateView();
        }
示例#2
0
        /// <summary>
        /// Removes the cell from row.
        /// </summary>
        /// <param name="row">Row.</param>
        protected void RemoveCellFromRow(TableListComponent row)
        {
            var cell = row.transform.GetChild(cellToDelete);

            cell.gameObject.SetActive(false);
            cell.transform.SetParent(null, false);

            row.TextComponents.RemoveAt(cellToDelete);
            row.UpdateView();
        }