# TableColumn Class

> An instance of the TableColumn class represents a single column of a table in a Text Control document. It can be obtained from the table's column collection.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Class
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > TableColumn Class
- **916 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tablecolumn/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tablecolumn/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tablecolumn/llms-full.txt

---

### Description

An instance of the TableColumn class represents a single column of a table in a Text Control document. It can be obtained from the table's column collection.

### Syntax

```csharp
public class TableColumn
```

```vbnet
Public Class TableColumn
```

### Examples

The following example shows how to handle table columns.

```csharp
TXTextControl.TableColumn myCol = myTable.Columns.GetItem(1);
int myDelta = (int)(myCol.Width / 5);
myCol.Width -= myDelta;
myCol.Position += myDelta;
```

```vbnet
Dim MyCol As TXTextControl.TableColumn = MyTable.Columns.GetItem(1)
Dim MyDelta As Integer = CInt(MyCol.Width / 5)
MyCol.Width -= MyDelta
MyCol.Position += MyDelta
```

The following example creates a small report table and works with its structure.

```csharp
textControl.Tables.Add(3, 3, 10);
Table table = textControl.Tables.GetItem(10);
TableColumn tableColumn = table.Columns[2];
```

```vbnet
textControl.Tables.Add(3, 3, 10)
Dim table As Table = textControl.Tables.GetItem(10)
Dim tableColumn As TableColumn = table.Columns(2)
```

---

## In This Section

- [TableColumn.CellFormat Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tablecolumn/cellformat-property/llms-full.txt): Gets or sets the formatting attributes of a table column. The property's value is an object of the type TableCellFormat.
- [TableColumn.Column Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tablecolumn/column-property/llms-full.txt): Gets the number of the table column represented through this table column object.
- [TableColumn.Position Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tablecolumn/position-property/llms-full.txt): Gets or sets, in twips, the horizontal position of the column.
- [TableColumn.Select Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tablecolumn/select-method/llms-full.txt): Selects the table column.
- [TableColumn.Width Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tablecolumn/width-property/llms-full.txt): Gets or sets, in twips, the width of the column. If the cells of the column have different widths, the property returns 0.

---

## Nearby

- **Previous:** [TableCollection.SupportedNumberFormats Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tablecollection/supportednumberformats-property/llms-full.txt)
- **Next:** [TableColumn.CellFormat Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tablecolumn/cellformat-property/llms-full.txt)
