
An instance of the SectionFormat class represents the formatting attributes of a section.
Introduced: 14.0.
[C#]
public class SectionFormat
[Visual Basic]
Public Class SectionFormat
| Constructor | Description | |
| SectionFormat | Initializes a new instance of the SectionFormat class. |
| Property | Description | |
| BreakKind | Gets or sets the kind of the section break the section starts with. | |
| ColumnDistances | Gets the distances, in twips, between the columns on a page. | |
| ColumnLineColor | Gets or sets the color of a dividing line between two columns. | |
| ColumnLineWidth | Gets or sets the width of a dividing line between two columns. | |
| Columns | Gets or sets the number of columns on a page. | |
| ColumnWidths | Gets the widths, in twips, of the columns on a page. | |
| EqualColumnWidth | Gets or sets a value indicating whether the columns on a page have all the same width and the same distance between them. | |
| Landscape | Gets or sets a value indicating whether the section's page size is in landscape orientation. | |
| PageBorder | Gets or sets the attributes of a section's page border. | |
| PageMargins | Gets or sets the section's page margins. | |
| PageSize | Gets or sets the section's page size. |
| Enumeration | Description | |
| Attribute | Determines a certain section format attribute. |
The following example shows how to add a new section with a specific page size, orientation and margins into an existing document. Additionally, the section is devided into 3 columns with different column widths and column distances:
[C#]
TXTextControl.SectionFormat sf = new TXTextControl.SectionFormat(3, new int[] { 1500, 2500, 5000 }, new int[] { 250, 500 });
sf.ColumnLineColor = Color.Black;
sf.ColumnLineWidth = 50;
sf.PageSize = new Size(500, 1000);
sf.Landscape = true;
sf.PageMargins = new TXTextControl.PageMargins(100, 100, 100, 100);
textControl1.Sections.Add(TXTextControl.SectionBreakKind.BeginAtNewPage);
textControl1.Sections.GetItem().Format = sf;
[Visual Basic]
Dim sf As New TXTextControl.SectionFormat(3, New Integer() {1500, 2500, 5000}, New Integer() {250, 500})
sf.ColumnLineColor = Color.Black
sf.ColumnLineWidth = 50
sf.PageSize = New Size(500, 1000)
sf.Landscape = True
sf.PageMargins = New TXTextControl.PageMargins(100, 100, 100, 100)
TextControl1.Sections.Add(TXTextControl.SectionBreakKind.BeginAtNewPage)
TextControl1.Sections.GetItem().Format = sf