RowColumn

References
public struct RowColumn
Represents a row+column index pair.

Constructors

RowColumn

#
public RowColumn(int rowIndex, int columnIndex, int rowCount, int columnCount, bool rowsFirst)
Create a new row+column index pair from scratch.
rowIndex (int)Current row index.
columnIndex (int)Current column index.
rowCount (int)Maximum number of rows.
columnCount (int)Maximum number of columns.
rowsFirst (bool)If true, rows are filled up before columns.

Properties

Col

#
public int Col { get; }
Gets the column index.

ColCount

#
public int ColCount { get; }
Gets the number of columns

IsValid

#
public bool IsValid { get; }
Gets whether this index pair is considered valid.

Row

#
public int Row { get; }
Gets the row index.

RowCount

#
public int RowCount { get; }
Gets the number of rows.

RowsFirst

#
public bool RowsFirst { get; }
Gets whether rows are filled before columns.

Methods

CellOutline

#
public RectangleF CellOutline(RectangleF bounds)
Assuming equal row and column sizes, gets the bounds of the current cell.
bounds (RectangleF)Bounds for entire table.
Cell outline.

ColumnFill

#
public static RowColumn ColumnFill(int rowCount, int columnCount)
Create a new row+column index pair at (0,0).
rowCount (int)Number of rows in grid.
columnCount (int)Number of columns in grid.

NextCol

#
public RowColumn NextCol()
Move this index pair to the start of the next column.

NextRow

#
public RowColumn NextRow()
Move this index pair to the start of the next row.

RowFill

#
public static RowColumn RowFill(int rowCount, int columnCount)
Create a new row+column index pair at (0,0).
rowCount (int)Number of rows in grid.
columnCount (int)Number of columns in grid.

Operators

OperationResultDescription
--RowColumnRowColumnDecrement this pair to the previous cell.
++RowColumnRowColumnIncrement this pair to the next cell.