Table of Contents

Class TableColumn

Namespace
SharpConsoleUI.Controls
Assembly
SharpConsoleUI.dll

Represents a column configuration in a TableControl.

public class TableColumn
Inheritance
TableColumn
Inherited Members
Extension Methods

Constructors

TableColumn()

Initializes a new instance of the TableColumn class with default settings.

public TableColumn()

TableColumn(string)

Initializes a new instance of the TableColumn class with the specified header.

public TableColumn(string header)

Parameters

header string

TableColumn(string, TextJustification)

Initializes a new instance of the TableColumn class with the specified header and alignment.

public TableColumn(string header, TextJustification alignment)

Parameters

header string
alignment TextJustification

TableColumn(string, TextJustification, int?)

Initializes a new instance of the TableColumn class with the specified header, alignment, and width.

public TableColumn(string header, TextJustification alignment, int? width)

Parameters

header string
alignment TextJustification
width int?

Properties

Alignment

Gets or sets the text alignment for cells in this column.

public TextJustification Alignment { get; set; }

Property Value

TextJustification

CustomComparer

Gets or sets a custom comparer for sorting this column. When null, default string comparison is used.

public IComparer<string>? CustomComparer { get; set; }

Property Value

IComparer<string>

Header

Gets or sets the header text for this column.

public string Header { get; set; }

Property Value

string

HeaderColor

Gets or sets the foreground color for the header text.

public Color? HeaderColor { get; set; }

Property Value

Color?

IsSortable

Gets or sets whether this column supports sorting. Default is true.

public bool IsSortable { get; set; }

Property Value

bool

NoWrap

Gets or sets whether text in this column should not wrap.

public bool NoWrap { get; set; }

Property Value

bool

Tag

Gets or sets an arbitrary object associated with this column for user data.

public object? Tag { get; set; }

Property Value

object

Width

Gets or sets the fixed width for this column. Null means auto-width.

public int? Width { get; set; }

Property Value

int?