コード例 #1
0
        public Table(Widget tableWidget)
        {
            this.tableWidget = tableWidget;

            Columns        = new TableColumnCollection();
            Columns.Table  = this;
            Rows           = new TableRowCollection();
            Rows.Table     = this;
            Rows.Cleared  += new Action(Rows_Cleared);
            RowHeight      = ScaleHelper.Scaled(20);
            HeaderHeight   = ScaleHelper.Scaled(20);
            CurrentEditRow = -1;
        }
コード例 #2
0
        internal void createMissingCells()
        {
            TableColumnCollection columns = Table.Columns;
            int numColumns = columns.Count;

            for (int i = 0; i < numColumns; ++i)
            {
                TableCell cell = null;
                if (i < Count)
                {
                    cell = this[i];
                    if (cell == null)
                    {
                        this[i] = cell = columns[i].createCell();
                    }
                }
                else
                {
                    cell = columns[i].createCell();
                    add(cell);
                }
                cell.setStaticMode();
            }
        }