Add row and column accessors for tables and grids

This commit is contained in:
Patrik Svensson
2020-10-26 11:51:35 +01:00
committed by Patrik Svensson
parent 3e5e22d6c2
commit e7f497050c
30 changed files with 511 additions and 162 deletions

View File

@ -1,4 +1,4 @@
Title: Calendar
Title: Calendar
Order: 4
RedirectFrom: calendar
---
@ -58,7 +58,7 @@ You can hide the calendar header.
```csharp
var calendar = new Calendar(2020,10);
calendar.ShowHeader = false;
calendar.ShowHeader();
AnsiConsole.Render(calendar);
```

View File

@ -91,33 +91,33 @@ table.Width(50);
## Alignment
```csharp
column.Alignment(Justify.Right);
column.LeftAligned();
column.Centered();
column.RightAligned();
table.Columns[0].Alignment(Justify.Right);
table.Columns[0].LeftAligned();
table.Columns[0].Centered();
table.Columns[0].RightAligned();
```
## Padding
```csharp
// Set left and right padding
column.Padding(left: 3, right: 5);
table.Columns[0].Padding(left: 3, right: 5);
// Set padding individually.
column.PadLeft(3);
column.PadRight(5);
// Set padding individually
table.Columns[0].PadLeft(3);
table.Columns[0].PadRight(5);
```
## Disable column wrapping
```csharp
// Disable column wrapping
column.NoWrap();
table.Columns[0].NoWrap();
```
## Set column width
```csharp
// Set the column width (no fluent extension method for this yet)
column.Width = 15;
// Set the column width
table.Columns[0].Width(15);
```