SectionColumns Interface
Represents an interface for creating, applying and retrieving a column layout of a section in a document.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v19.1.Core.dll
Declaration
Remarks
Use the Section.Columns property to access the SectionColumns interface.
Example
This code snippet uses the Document.Sections property to get access to the section in the document and calls the SectionColumns.CreateUniformColumns method to create a multicolumn layout with the current Section.Page section settings. Subsequently the column width is modified and the resulting layout is applied to the section using the SectionColumns.SetColumns method.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/winforms-richedit-document-api-e5219
document.LoadDocument("Grimm.docx", DevExpress.XtraRichEdit.DocumentFormat.OpenXml)
document.Unit = DevExpress.Office.DocumentUnit.Inch
' Get the first section in a document.
Dim firstSection As Section = document.Sections(0)
' Create equal width column layout.
Dim sectionColumnsLayout As SectionColumnCollection = firstSection.Columns.CreateUniformColumns(firstSection.Page, 0.2F, 3)
' Set different column width.
sectionColumnsLayout(0).Width = 3F
sectionColumnsLayout(1).Width = 2F
sectionColumnsLayout(2).Width = 1F
' Apply layout to the document.
firstSection.Columns.SetColumns(sectionColumnsLayout)