Search Results for

Show / Hide Table of Contents

# Class TableStyle

Defines rendering options that affect how the table is displayed. See TableView Deep Dive for more information.

##### Inheritance

System.Object
TableStyle

##### Inherited Members

System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()

###### Namespace: Terminal.Gui

###### Assembly: Terminal.Gui.dll

##### Syntax

    public class TableStyle

### Properties

#### AlwaysShowHeaders

When scrolling down always lock the column headers in place as the first row of the table

##### Declaration

    public bool AlwaysShowHeaders { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

#### ColumnStyles

Collection of columns for which you want special rendering (e.g. custom column lengths, text alignment etc)

##### Declaration

    public Dictionary<DataColumn, ColumnStyle> ColumnStyles { get; set; }

##### Property Value

Type | Description
--- | ---
System.Collections.Generic.Dictionary<System.Data.DataColumn, ColumnStyle> |

#### ShowHorizontalHeaderOverline

True to render a solid line above the headers

##### Declaration

    public bool ShowHorizontalHeaderOverline { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

#### ShowHorizontalHeaderUnderline

True to render a solid line under the headers

##### Declaration

    public bool ShowHorizontalHeaderUnderline { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

#### ShowVerticalCellLines

True to render a solid line vertical line between cells

##### Declaration

    public bool ShowVerticalCellLines { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

#### ShowVerticalHeaderLines

True to render a solid line vertical line between headers

##### Declaration

    public bool ShowVerticalHeaderLines { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

### Methods

#### GetColumnStyleIfAny(DataColumn)

Returns the entry from ColumnStyles for the given `col` or null if no custom styling is defined for it

##### Declaration

    public ColumnStyle GetColumnStyleIfAny(DataColumn col)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Data.DataColumn | col |

##### Returns

Type | Description
--- | ---
ColumnStyle |

#### GetOrCreateColumnStyle(DataColumn)

Returns an existing ColumnStyle for the given `col` or creates a new one with default options

##### Declaration

    public ColumnStyle GetOrCreateColumnStyle(DataColumn col)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Data.DataColumn | col |

##### Returns

Type | Description
--- | ---
ColumnStyle |