Skip to content

TableExtensions Class

Extensions used for the Table

C#
public static class TableExtensions

Inheritance object

Returns a range of cells that fits the given parameter values.

C#
public static IEnumerable<Table.Cell> Range(this Table.TableCells cells, int startRow, int startCol, int endRow, int endCol)

cells Table.TableCells

startRow int

startCol int

endRow int

endCol int

IEnumerable<Table.Cell>

Executes an action on each cell.

C#
public static void ForEach(this IEnumerable<Table.Cell> range, Action<Table.Cell> action)

range IEnumerable<Table.Cell>

action Action<Table.Cell>

Sets the layout for the cell.

C#
public static void SetLayout(this Table.Cell cell, Color? foreground = null, Color? background = null, Table.Cell.Options? settings = null)

cell Table.Cell

foreground System.NullableSadRogue.Primitives.Color

background System.NullableSadRogue.Primitives.Color

settings Table.Cell.Options

Resizes the entire column and row to the specified sizes. If no sizes are specified for both row and column, the cell will be reset to the default size.

C#
public static void Resize(this Table.Cell cell, int? rowSize = null, int? columnSize = null)

cell Table.Cell

rowSize int?

columnSize int?

Sets the cell as the selected cell.

C#
public static void Select(this Table.Cell cell)

cell Table.Cell

Incase this cell is the selected cell, it will unselect it.

C#
public static void Deselect(this Table.Cell cell)

cell Table.Cell

Get the layout for the given columns.

C#
public static Table.TableCells.Layout.RangeEnumerable Column(this Table.TableCells cells, params int[] columns)

cells Table.TableCells

columns int[]

Table.TableCells.Layout.RangeEnumerable

Get the layout for the given rows.

C#
public static Table.TableCells.Layout.RangeEnumerable Row(this Table.TableCells cells, params int[] rows)

cells Table.TableCells

rows int[]

Table.TableCells.Layout.RangeEnumerable

Removes the cell from its table.

C#
public static void Remove(this Table.Cell cell)

cell Table.Cell