private void SetData(int row, int col, TextLayout layout, AttributedCharacterIterator iter) { if (layout == null) { return; } if (p_sizeCalculated) { throw new Exception("Size already calculated"); } if (row < 0 || row >= m_rows) { throw new IndexOutOfRangeException("Row Index=" + row + " Rows=" + m_rows); } if (col < 0 || col >= m_cols) { throw new IndexOutOfRangeException("Column Index=" + col + " Cols=" + m_cols); } // m_textLayout[row, col] = layout; m_iterator[row, col] = iter; // Set Size int height = layout.GetFont().Height; int width = (int)layout.GetAdvance() + 1; if (m_rowHeight[row] < height) { m_rowHeight[row] = height; } if (m_colWidth[col] < width) { m_colWidth[col] = width; } } // setData