Class TableColor
Table writer with color support
Inheritance
Namespace: Terminaux.Writer.FancyWriters
Assembly: Terminaux.dll
Syntax
[Obsolete("This is considered a legacy method of writing this fancy text and will be removed in a future version of Terminaux. Please use its cyclic writer equivalent.")]
public static class TableColor
Methods
| Edit this page View SourceRenderTable(string[,], int, int, int, int, bool, Color, Color, Color, Color, List<CellOptions>?, BorderSettings?)
Renders a table with text
Declaration
public static string RenderTable(string[,] Rows, int left, int top, int width, int height, bool enableHeader, Color SeparatorForegroundColor, Color HeaderForegroundColor, Color ValueForegroundColor, Color BackgroundColor, List<CellOptions>? CellOptions = null, BorderSettings? tableBorderSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string[,] | Rows | Rows to insert to the table. |
int | left | Left position of the upper-left corner |
int | top | Top position of the upper-left corner |
int | width | Table interior width |
int | height | Table interior height |
bool | enableHeader | Whether to enable the header or no |
Color | SeparatorForegroundColor | A separator foreground color that will be changed to. |
Color | HeaderForegroundColor | A header foreground color that will be changed to. |
Color | ValueForegroundColor | A value foreground color that will be changed to. |
Color | BackgroundColor | A background color that will be changed to. |
List<CellOptions> | CellOptions | Specifies the cell options |
BorderSettings | tableBorderSettings | Specifies the table border settings |
Returns
Type | Description |
---|---|
string |
RenderTablePlain(string[,], int, int, int, int, bool, List<CellOptions>?, BorderSettings?)
Renders a table with text
Declaration
public static string RenderTablePlain(string[,] Rows, int left, int top, int width, int height, bool enableHeader, List<CellOptions>? CellOptions = null, BorderSettings? tableBorderSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string[,] | Rows | Rows to insert to the table. |
int | left | Left position of the upper-left corner |
int | top | Top position of the upper-left corner |
int | width | Table interior width |
int | height | Table interior height |
bool | enableHeader | Whether to enable the header or no |
List<CellOptions> | CellOptions | Specifies the cell options |
BorderSettings | tableBorderSettings | Specifies the table border settings |
Returns
Type | Description |
---|---|
string |
WriteTable(string[,], int, int, int, int, bool, List<CellOptions>?, BorderSettings?)
Draw a table with text
Declaration
public static void WriteTable(string[,] Rows, int left, int top, int width, int height, bool enableHeader, List<CellOptions>? CellOptions = null, BorderSettings? tableBorderSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string[,] | Rows | Rows to insert to the table. |
int | left | Left position of the upper-left corner |
int | top | Top position of the upper-left corner |
int | width | Table interior width |
int | height | Table interior height |
bool | enableHeader | Whether to enable the header or no |
List<CellOptions> | CellOptions | Specifies the cell options |
BorderSettings | tableBorderSettings | Specifies the table border settings |
WriteTable(string[,], int, int, int, int, bool, Color, Color, Color, Color, List<CellOptions>?, BorderSettings?)
Draw a table with text
Declaration
public static void WriteTable(string[,] Rows, int left, int top, int width, int height, bool enableHeader, Color SeparatorForegroundColor, Color HeaderForegroundColor, Color ValueForegroundColor, Color BackgroundColor, List<CellOptions>? CellOptions = null, BorderSettings? tableBorderSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string[,] | Rows | Rows to insert to the table. |
int | left | Left position of the upper-left corner |
int | top | Top position of the upper-left corner |
int | width | Table interior width |
int | height | Table interior height |
bool | enableHeader | Whether to enable the header or no |
Color | SeparatorForegroundColor | A separator foreground color that will be changed to. |
Color | HeaderForegroundColor | A header foreground color that will be changed to. |
Color | ValueForegroundColor | A value foreground color that will be changed to. |
Color | BackgroundColor | A background color that will be changed to. |
List<CellOptions> | CellOptions | Specifies the cell options |
BorderSettings | tableBorderSettings | Specifies the table border settings |
WriteTablePlain(string[,], int, int, int, int, bool, List<CellOptions>?, BorderSettings?)
Draw a table with text
Declaration
public static void WriteTablePlain(string[,] Rows, int left, int top, int width, int height, bool enableHeader, List<CellOptions>? CellOptions = null, BorderSettings? tableBorderSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string[,] | Rows | Rows to insert to the table. |
int | left | Left position of the upper-left corner |
int | top | Top position of the upper-left corner |
int | width | Table interior width |
int | height | Table interior height |
bool | enableHeader | Whether to enable the header or no |
List<CellOptions> | CellOptions | Specifies the cell options |
BorderSettings | tableBorderSettings | Specifies the table border settings |