
Here's the code from the preOpenCard handler of my report form/card. (Tab delimited text is sent to the card elsewhere.):
Code: Select all
--To create the grid set the hGrid and vGrid properties of the lines of the field which make up the table.
set the hGrid of line 2 to -2 of field "FieldNote" to true
set the vGrid of line 2 to -2 of field "FieldNote" to true
--first column narrower than second column
set the tabWidths of line 2 to -2 of field "FieldNote" to 130,300,0
--add some spacing between the text paragraphs and the table.
set the spaceBelow of line 1 of field "FieldNote" to 10
set the spaceAbove of line -1 of field "FieldNote" to 10
--To add a border to the table as a whole we set the borderWidth of all the lines in
--the table. When in hGrid mode, borders of adjacent lines which have compatible
--properties are elided into a 1-pixel grid line.
set the borderWidth of line 2 to -2 of field "FieldNote" to 2