SectionColumns.SetColumns(SectionColumnCollection) Method
Applies the columns to the section.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v18.2.Core.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
columns | SectionColumnCollection | A SectionColumnCollection representing the layout to be applied. |
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)
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the SetColumns(SectionColumnCollection) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.