Stores the cell alignment settings (horizontal/vertical position, wrapping, indent, rotation) applied through a
TXLSXCellFormat brush;
TXLSXAlignments TXLSXAlignment class for HotXLS components
Syntax
TXLSXAlignment = class;
TXLSXAlignments = class;
Key members
| Horizontal, Vertical | TXLSXHorizontalAlignment / TXLSXVerticalAlignment — cell content alignment |
| WrapText, ShrinkToFit | Boolean; wrap long text onto multiple lines, or shrink the font to fit the column width |
| Indent | Integer, typically 0..15 — indent level shown in the Excel Alignment dialog |
| TextRotation | Integer, -90..90 degrees |
| QuotePrefix | Boolean; marks the cell's stored text as a literal (Excel's leading-apostrophe behaviour) — written on the cell's <xf>, not the <alignment> element |
| IsDefault | Returns True when every member is still at its default value |
| Add, Count, Items | TXLSXAlignments pool members: append a new instance, and enumerate the pool |
Example
This example wraps text and centres it in the cells formatted through CellFormat
CellFormat.Alignment.Horizontal := xlsxXAlignCenter;
CellFormat.Alignment.WrapText := True;
See also