Show / Hide Table of Contents

Class Table.Cell

A basic cell used in the Table control

Inheritance
object
Table.Cell
Implements
IEquatable<Table.Cell>
Inherited Members
object.GetType()
object.ToString()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: SadConsole.UI.Controls
Assembly: SadConsole.Extended.dll
Syntax
public sealed class Table.Cell : IEquatable<Table.Cell>

Properties

Background

The background color used by the cell

Declaration
public Color Background { get; set; }
Property Value
Type Description
Color

Column

The column this cell is part of

Declaration
public int Column { get; }
Property Value
Type Description
int

Foreground

The foreground color used by the cell

Declaration
public Color Foreground { get; set; }
Property Value
Type Description
Color

Height

The height of the row this cell is part of

Declaration
public int Height { get; }
Property Value
Type Description
int

IsVisible

Set to false if the cell should not be rendered within the table (default IsVisible sadconsole behaviour), If an entire row or column IsVislbe is set to false in the layout, it will skip this row/column entirely (differs from default behaviour)

Declaration
public bool IsVisible { get; set; }
Property Value
Type Description
bool

Row

The row this cell is part of

Declaration
public int Row { get; }
Property Value
Type Description
int

Settings

The setting options used by the cell to define its layout

Declaration
public Table.Cell.Options Settings { get; }
Property Value
Type Description
Table.Cell.Options

StringValue

The text shown within the cell, empty string when no value.

Declaration
public string StringValue { get; }
Property Value
Type Description
string

Value

The value of the cell, .ToString() method is shown as the text result within the cell.

Declaration
public object? Value { get; set; }
Property Value
Type Description
object

Width

The width of the column this cell is part of

Declaration
public int Width { get; }
Property Value
Type Description
int

Methods

CopyAppearanceFrom(Cell)

Copies the appearance of the cell passed to this method, onto the this cell.

Declaration
public void CopyAppearanceFrom(Table.Cell cell)
Parameters
Type Name Description
Table.Cell cell

Equals(Cell?)

Declaration
public bool Equals(Table.Cell? cell)
Parameters
Type Name Description
Table.Cell cell
Returns
Type Description
bool

Equals(object?)

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
object.Equals(object)

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
object.GetHashCode()

InternalCreate(int, int, Table, object, bool)

Internal use only. This is used by the table and the theme to create new cell instances.

Declaration
public static Table.Cell InternalCreate(int row, int col, Table table, object value, bool addToTableIfModified = true)
Parameters
Type Name Description
int row
int col
Table table
object value
bool addToTableIfModified
Returns
Type Description
Table.Cell

Operators

operator ==(Cell?, Cell?)

Declaration
public static bool operator ==(Table.Cell? a, Table.Cell? b)
Parameters
Type Name Description
Table.Cell a
Table.Cell b
Returns
Type Description
bool

operator !=(Cell?, Cell?)

Declaration
public static bool operator !=(Table.Cell? a, Table.Cell? b)
Parameters
Type Name Description
Table.Cell a
Table.Cell b
Returns
Type Description
bool

Implements

IEquatable<T>

Extension Methods

TableExtensions.Deselect(Table.Cell)
TableExtensions.Remove(Table.Cell)
TableExtensions.Resize(Table.Cell, int?, int?)
TableExtensions.Select(Table.Cell)
TableExtensions.SetLayout(Table.Cell, Color?, Color?, Table.Cell.Options?)
ExtensionsSystem.GetDebuggerDisplayValue(object)
In this article

Back to top

Back to top Generated by DocFX