Search Locate Previous Next Contents

leaf.table.CellWidths – set cell widths

Width of each cell in points. May be given as ¯32768 (-2*15) which measures the column at runtime to fit the given data; the width is limited by the MaxCell property. Any unspecified widths (or columns given as -ve 1) will share the remaining space in the frame after all specified columns have been placed.

leaf.table.CellWidths ¯1 72 144

This example sets 2 columns explicitly and leaves the first column to take all the slack.

If you prefer, you can use -ve numbers throughout to allocate the frame width in proportion:

leaf.table.CellWidths ¯3 ¯1 ¯1 ¯2

... which will use the available space in the ratio 3:1:1:2. You can mix the settings as required to give some columns absolute widths and let others share the remaining space. Note that NewLeaf currently sets a minimum cell width of 24pt for columns which it calculates, so it is possible that not all your columns will fit into the frame if you use the automatic allocation. If this happens, you can use leaf.table.MinCell to over-ride this default.



Continue to: leaf.table.Clip – set cell clipping
© Copyright Causeway Graphical Systems Ltd 2001