CellAlignment
Release: |
4.6 • 5.0 • 5.1 • 5.2 • 5.3 • 5.4 • 6.0 • 6.1 • 6.2 • 6.3 • 6.4 • 6.5 |
---|
New to Analytica 5.0
CellAlignment( horiz, indent, vert, vertIndent )
Specifies the text alignment (justification) or indention for a cell in a table. This is used from within a Cell Format Expression attribute, see Computed cell formats for an overview of using computed formats.
Parameters:
- «horiz»: The horizontal alignment. One of:
'Left'
,'Center'
,'Right'
, or'Default'
. - «indent»: An indention amount, in units equal to the width of one space character. For
'Left'
alignment, this is a margin to the left of the text, for'Right'
it is a margin to the right of the text, and for'Center'
it is a margin on both sides. - «vert»: The vertical alignment. One of
'Top'
,'Middle'
,'Bottom'
or'Default'
. - «vertIndent»: Vertical margin in pixel units. For
'Top'
, this is a margin above the text, for'Bottom'
it is a margin below the text, and for'Middle'
it is a margin on both sides.
The «horiz» and «vert» parameters also accept 'Justify'
, 'Fill'
, and 'Distributed'
. However, these modes are not honored -- instead it just maps to the most appropriate justification among the stated options. When reading cell justifications in an excel spreadsheet, these values are possible (e.g., from SpreadsheetCell with «what» set to 'HorizontalAlignment'
or 'VerticalAlignment'
).
When «horiz» is 'Default'
it right or left aligns cell content based on the data type displayed in the cell, and whether it is single or multiline content
Examples
These would appear in the Cell Format Expression attribute.
CellAlignment( 'Center' )
CellAlignment( If IsNumber(Self) Then 'Right' Else 'Left' )
CellSpan( LineItem, CellAlignment(vert:'Middle'), header:true )
In the next example, there is an index named Place
, and a variable Place_level
indexed by Place
, with a 0 for each state, a 1 for each county, and a 2 for each city.
CellSpan(Place, CellAlignment(indent:Place_level*3), header:true) :![]()
See Also
- Computed cell formats
- CellFormats
- CellSpan
- Other cell format predicates: CellFont, CellBorder, CellBar, CellFill, CellNumberFormat, CellOnClick, CellEntry
Enable comment auto-refresher