Class TableExtensions
Extensions used for the Table
Inherited Members
Namespace: SadConsole.UI.Controls
Assembly: SadConsole.Extended.dll
Syntax
public static class TableExtensions
Methods
Column(TableCells, params int[])
Get the layout for the given columns.
Declaration
public static Table.TableCells.Layout.RangeEnumerable Column(this Table.TableCells cells, params int[] columns)
Parameters
Type | Name | Description |
---|---|---|
Table.TableCells | cells | |
int[] | columns |
Returns
Type | Description |
---|---|
Table.TableCells.Layout.RangeEnumerable |
Deselect(Cell)
Incase this cell is the selected cell, it will unselect it.
Declaration
public static void Deselect(this Table.Cell cell)
Parameters
ForEach(IEnumerable<Cell>, Action<Cell>)
Executes an action on each cell.
Declaration
public static void ForEach(this IEnumerable<Table.Cell> range, Action<Table.Cell> action)
Parameters
Range(TableCells, int, int, int, int)
Returns a range of cells that fits the given parameter values.
Declaration
public static IEnumerable<Table.Cell> Range(this Table.TableCells cells, int startRow, int startCol, int endRow, int endCol)
Parameters
Returns
Type | Description |
---|---|
IEnumerable<Table.Cell> |
Remove(Cell)
Removes the cell from its table.
Declaration
public static void Remove(this Table.Cell cell)
Parameters
Resize(Cell, int?, int?)
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.
Declaration
public static void Resize(this Table.Cell cell, int? rowSize = null, int? columnSize = null)
Parameters
Row(TableCells, params int[])
Get the layout for the given rows.
Declaration
public static Table.TableCells.Layout.RangeEnumerable Row(this Table.TableCells cells, params int[] rows)
Parameters
Type | Name | Description |
---|---|---|
Table.TableCells | cells | |
int[] | rows |
Returns
Type | Description |
---|---|
Table.TableCells.Layout.RangeEnumerable |
Select(Cell)
Sets the cell as the selected cell.
Declaration
public static void Select(this Table.Cell cell)
Parameters
SetLayout(Cell, Color?, Color?, Options?)
Sets the layout for the cell.
Declaration
public static void SetLayout(this Table.Cell cell, Color? foreground = null, Color? background = null, Table.Cell.Options? settings = null)