TextColumnCollectionEvenlySpaced Property

True if text columns are of equal width and evenly spaced.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public bool EvenlySpaced { get; set; }

Property Value

Type: Boolean
Examples
Creates multiple columns of different widths in a section using DocumentBuilder.
DocumentBuilder builder = new DocumentBuilder();

TextColumnCollection columns = builder.PageSetup.TextColumns;
// Show vertical line between columns
columns.LineBetween = true;
// Indicate we want to create column with different widths
columns.EvenlySpaced = false;
// Create two columns, note they will be created with zero widths, need to set them
columns.SetCount(2);

// Set the first column to be narrow
TextColumn c1 = columns[0];
c1.Width = 100;
c1.SpaceAfter = 20;

// Set the second column to take the rest of the space available on the page
TextColumn c2 = columns[1];
PageSetup ps = builder.PageSetup;
double contentWidth = ps.PageWidth - ps.LeftMargin - ps.RightMargin;
c2.Width = contentWidth - c1.Width - c1.SpaceAfter;

builder.Writeln("Narrow column 1.");
builder.InsertBreak(BreakType.ColumnBreak);
builder.Writeln("Wide column 2.");

builder.Document.Save(ArtifactsDir + "PageSetup.CustomColumnWidth.doc");
See Also