Click or drag to resize

HeightRule Enumeration

Specifies the rule for determining the height of an object.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.2
Syntax
public enum HeightRule
Members
  Member nameValueDescription
AtLeast0 The height will be at least the specified height in points. It will grow, if needed, to accommodate all text inside an object.
Exactly1 The height is specified exactly in points. Please note that if the text cannot fit inside the object of this height, it will appear truncated.
Auto2 The height will grow automatically to accommodate all text inside an object.
Examples
Shows how to create a table that contains a single cell and apply row formatting.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

Table table = builder.StartTable();
builder.InsertCell();

// Set the row formatting
RowFormat rowFormat = builder.RowFormat;
rowFormat.Height = 100;
rowFormat.HeightRule = HeightRule.Exactly;
// These formatting properties are set on the table and are applied to all rows in the table
table.LeftPadding = 30;
table.RightPadding = 30;
table.TopPadding = 30;
table.BottomPadding = 30;

builder.Writeln("Contents of formatted row.");

builder.EndRow();
builder.EndTable();
See Also