| Search Locate Previous Next | Contents |
The height of a row in a NewLeaf table is the sum of two properties. The first is the largest value of the line-spacing property of all of the fonts in the row (remember, a different font specification can apply to each column). The second is the spacing property. This sets the amount, in points, of additional white space to be left above and below the largest line-spacing value of all of the fonts in the row. By default, these spacing property values are 3 and 3 points respectively. These combine with a default line height of 14.4 points to give a default row height of 20.4 points. To maintain this row height and to position the sales data along bottom edge of the row, specify a spacing of six points from the top and zero points from the bottom of each cell:
nlInit ª nlUse'' nltSpacing 6 0 nltList salesQ1 View docnlClose
In the sales report, you may have found that removing all but one of the horizontal rules left the report looking somewhat spread out. Squeeze the rows together by setting the spacing above and below each row to zero:
nlInit ª nlUse'' nltFont ('TI,10'),((¯1+¯1½salesQ1)½'HE,10'),'HEB,10' nltQfmt (''),((¯1+¯1½salesQ1)½'CF8.1'),'CF9.1' nltAlign ('left'),(¯1½salesQ1)½'decimal1' nltCellWidths 72×0.9,((¯1+¯1½salesQ1)½0.75),0.8 nltGridlines 1,(0.5,(1-¯1½salesQ1)0.5),0 nltSpacing 0 0 nltList ¯1[1]products,salesQ1 nltRule 0.5 nltList ¯1[1]products,salesQ1 View docnlClose
Unfortunately, this produces a table that appears cramped. Try spacing one point above and below each row of the product sales data and, to make the column totals stand out, increase the spacing to three points above and below the totals data in the final row:
nlInit ª nlUse'' nltFont ('TI,10'),((¯1+¯1½salesQ1)½'HE,10'),'HEB,10' nltQfmt (''),((¯1+¯1½salesQ1)½'CF8.1'),'CF9.1' nltAlign ('left'),(¯1½salesQ1)½'decimal1' nltCellWidths 72×0.9,((¯1+¯1½salesQ1)½0.75),0.8 nltGridlines 1,(0.5,(1-¯1½salesQ1)0.5),0 nltSpacing 1 1 nltList ¯1[1]products,salesQ1 nltRule 0.5 ª nltSpacing 3 3 nltList ¯1[1]products,salesQ1 View docnlClose
This concludes the introduction to the NewLeaf table-handling features. If you are planning to take a break, save your work as the following topics continue to develop the sales report.