# SectionFormat.ColumnWidths Property

> Gets the widths, in twips, of the columns on a page. This property is read only, to set new widths one of the SectionFormat constructors must be used.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 15.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.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 for Windows Forms > Reference > TXTextControl > SectionFormat.ColumnWidths Property
- **471 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/sectionformat/columnwidths-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/sectionformat/columnwidths-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/sectionformat/columnwidths-property/llms-full.txt

---

### Description

Gets the widths, in twips, of the columns on a page. This property is read only, to set new widths one of the SectionFormat constructors must be used.

### Syntax

```csharp
public int[] ColumnWidths { get; }
```

```vbnet
Public ReadOnly Property ColumnWidths As Integer()
```

### Examples

The following example configures the layout of the first document section by using `SectionFormat.ColumnWidths`.

```csharp
SectionFormat sectionFormat = textControl.Sections[1].Format;

foreach (int int32 in sectionFormat.ColumnWidths)
{
    Console.WriteLine(int32);
}
```

```vbnet
Dim sectionFormat As SectionFormat = textControl.Sections(1).Format

For Each int32 As Integer In sectionFormat.ColumnWidths
    Console.WriteLine(int32)
Next
```

### Limitations

Read only.

### Remarks

The size of the array is the number of columns.

The property returns null when the text selection contains multiple sections with mixed setting. The [Selection.IsCommonValueSelected](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/selection/iscommonvalueselected-method/llms-full.txt) method can be used to check for mixed attributes.

---

## Nearby

- **Previous:** [SectionFormat.Columns Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/sectionformat/columns-property/llms-full.txt)
- **Next:** [SectionFormat Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/sectionformat/constructor/llms-full.txt)
