Specifies the rule for determining the height of an object.
Namespace:
Aspose.Words
Assembly:
Aspose.Words (in Aspose.Words.dll) Version: 20.3
SyntaxPublic Enumeration HeightRule
public enum class HeightRule
Members
| Member name | Value | Description |
---|
| AtLeast | 0 |
The height will be at least the specified height in points. It will grow, if needed,
to accommodate all text inside an object.
|
| Exactly | 1 |
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.
|
| Auto | 2 |
The height will grow automatically to accommodate all text inside an object.
|
ExamplesShows 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();
RowFormat rowFormat = builder.RowFormat;
rowFormat.Height = 100;
rowFormat.HeightRule = HeightRule.Exactly;
table.LeftPadding = 30;
table.RightPadding = 30;
table.TopPadding = 30;
table.BottomPadding = 30;
builder.Writeln("Contents of formatted row.");
builder.EndRow();
builder.EndTable();
See Also