TX Text Control .NET for Windows Forms

SectionFormat Constructor

Constructor|Introduced in 14.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Creates a new instance of the SectionFormat class.

Syntax

SectionFormat()

Creates an empty SectionFormat object. Further properties must be set.

public SectionFormat();

SectionFormat(int, int)

Creates a SectionFormat object for a section with equal column widths. The SectionFormat.EqualColumnWidth property is automatically set to true.

public SectionFormat(int columns, int columnDistance);
ParameterDescription
columns

Specifies the number of columns for the section.

columnDistance

Specifies the distance between equal columns.

SectionFormat(int, int[], int[])

Creates a SectionFormat object for a section with individual column widths and distances. The SectionFormat.EqualColumnWidth property is automatically set to false.

public SectionFormat(int columns, int[] columnWidths, int[] columnDistances);
ParameterDescription
columns

Specifies the number of columns for the section.

columnWidths

Specifies the widths of the columns. The array must contain exactly an element for each column.

columnDistances

Specifies the distances between the columns. The array must contain exactly an element for each distance. The size of this array must be one less the size of the columnWidths array. The sum of all widths and distances must not exceed the width of the page's text area. Otherwise an exception occurs. The width of the text area is the page width less the left and the right page margin.

Examples

The following example creates a Section Format instance and configures its break kind setting for a document workflow.

SectionFormat sectionFormat = new();
sectionFormat.BreakKind = SectionBreakKind.BeginAtNewLine;