Search Locate Previous Next Contents

Horizontal Alignment of Column Titles

By default, NewLeaf centres each line of a column title in its cell. As with a table, you can specify a single horizontal alignment to be applied to all column titles:

leaf.Init ª leaf.Use''
leaf.table.Titles districts
leaf.table.TAlign 'right'
leaf.table.List salesQ1
View doc„leaf.Close

You can align each column title independently by specifying a vector of one or more horizontal alignment settings. NewLeaf reshapes this vector as required to match the number of columns. For example, to left- and right-align alternate columns of a table and its column titles:

leaf.Init ª leaf.Use''
leaf.table.Align 'left' 'right'
leaf.table.Titles districts
leaf.table.TAlign 'left' 'right'
leaf.table.List salesQ1
View doc„leaf.Close

Finally, look at the effect of right-aligning the titles of all but the first and last columns of the sales report. As there is no title for the first column, the horizontal alignment setting has no effect:

leaf.Init ª leaf.Use''
leaf.table.Font (›'TI,10'),((¯1+¯1†½salesQ1)½›'HE,10'),›'HEB,10'
leaf.table.Qfmt (›''),((¯1+¯1†½salesQ1)½›'CF8.1'),›'CF9.1'
leaf.table.Align (›'left'),(¯1†½salesQ1)½›'decimal1'
leaf.table.CellWidths 72×0.9,((¯1+¯1†½salesQ1)½0.75),0.8
leaf.table.Gridlines 1,(›0.5,(1-¯1†½salesQ1)†0.5),0
leaf.table.Spacing 1 1
leaf.table.Titles (›''),(¯1‡›[1]regions,[0.5]districts),¯1†districts
leaf.table.TAlign (›'centre'),((¯1+¯1†½salesQ1)½›'right'),›'centre'
leaf.table.List ¯1‡[1]products,salesQ1
leaf.table.Rule 0.5
leaf.table.Spacing 3 3
leaf.table.List ¯1†[1]products,salesQ1
View doc„leaf.Close


Continue to: Column Titles Font
© Copyright Causeway Graphical Systems Ltd 2001