Class TableView.ColumnStyle
Inheritance
TableView.ColumnStyle
Assembly: Terminal.Gui.dll
Syntax
public class TableView.ColumnStyle
Fields
|
Edit this page
View Source
AlignmentGetter
Defines a delegate for returning custom alignment per cell based on cell values. When specified this will override
Alignment
Declaration
public Func<object, TextAlignment> AlignmentGetter
Field Value
|
Edit this page
View Source
ColorGetter
Defines a delegate for returning a custom color scheme per cell based on cell values.
Return null for the default
Declaration
public TableView.CellColorGetterDelegate ColorGetter
Field Value
|
Edit this page
View Source
RepresentationGetter
Defines a delegate for returning custom representations of cell values. If not set then
ToString() is used. Return values from your delegate may be truncated e.g. based on
MaxWidth
Declaration
public Func<object, string> RepresentationGetter
Field Value
Properties
|
Edit this page
View Source
Alignment
Defines the default alignment for all values rendered in this column. For custom alignment based on cell contents use
AlignmentGetter.
Declaration
public TextAlignment Alignment { get; set; }
Property Value
|
Edit this page
View Source
Defines the format for values e.g. "yyyy-MM-dd" for dates
Declaration
public string Format { get; set; }
Property Value
|
Edit this page
View Source
MaxWidth
Declaration
public int MaxWidth { get; set; }
Property Value
|
Edit this page
View Source
MinAcceptableWidth
Enables flexible sizing of this column based on available screen space to render into.
Declaration
public int MinAcceptableWidth { get; set; }
Property Value
|
Edit this page
View Source
MinWidth
Set the minimum width of the column in characters. Setting this will ensure that
even when a column has short content/header it still fills a given width of the control.
This value will be ignored if more than the tables MaxCellWidth
or the MaxWidth
For setting a flexible column width (down to a lower limit) use MinAcceptableWidth
instead
Declaration
public int MinWidth { get; set; }
Property Value
|
Edit this page
View Source
Visible
Gets or Sets a value indicating whether the column should be visible to the user.
This affects both whether it is rendered and whether it can be selected. Defaults to
true.
Declaration
public bool Visible { get; set; }
Property Value
Remarks
Methods
|
Edit this page
View Source
GetAlignment(object)
Declaration
public TextAlignment GetAlignment(object cellValue)
Parameters
| Type |
Name |
Description |
| object |
cellValue |
|
Returns
|
Edit this page
View Source
GetRepresentation(object)
Returns the full string to render (which may be truncated if too long) that the current style says best represents the given value
Declaration
public string GetRepresentation(object value)
Parameters
| Type |
Name |
Description |
| object |
value |
|
Returns