Object Reference : Object View and Procedure Reference : Table
Sets line characteristics and borders for a set of table cells.
table_name.setlines(cell_range) line_args
where cell_range describes the table cells to be modified, and line_args is a set of arguments used to modify the existing line settings. See Table::setfillcolor for the syntax for cell_range.
The line_args may contain one or more of the following:
+t / -t
Top border [on/off].
+b / -b
Bottom border [on/off].
+l / -l
Left border [on/off].
+r / -r
Right border [on/off].
+i / -i
Inner borders [on/off].
+o / -o
Outer borders [on/off].
+v / -v
Vertical inner borders [on/off].
+h / -h
Horizontal inner borders [on/off].
+a / -a
All borders [on/off].
+d / -d
Double middle lines [on/of]f.
tab1.setlines(b2:d6) +o
draws borders around the outside of the rectangle defined by B2 and D6. Note that this command is equivalent to:
tab1.setlines(b2:d6) +a -h -v
which adds borders to all of the cells in the rectangle defined by B2 and D6, then removes the inner horizontal and vertical borders.
tab1.setlines(2,b) +o
puts a border around all four sides of the B2 cell.
tab1.setlines(2,b) -l -r +i
then removes both the left and the right border from the cell. In this example, “+i” option has no effect; since the specification involves a single cell, there are no inner borders.
tab1.setlines(@all) -a
removes all borders from the table.
See Table::settextcolor, Table::setfillcolor, and Table::setfont for details on changing text color and font.
For additional discussion of table commands see “Working with Tables and Spreadsheets”.
See also “Table Objects” for a discussion and examples of table formatting in EViews.