Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Eviews5 / EViews5 / Docs / EViews 5 Command Ref.pdf
Скачиваний:
91
Добавлен:
23.03.2015
Размер:
5.23 Mб
Скачать

setlines—465

See setlines (p. 465) for more flexible line drawing tools.

setlines

Table Proc

 

 

Sets line characteristics and borders for a set of table cells.

Syntax

Table Proc:

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 setfillcolor (p. 453) 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.

 

 

Examples

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.

466—Appendix B. Command Reference

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.

Cross-references

For additional discussion of tables see Chapter 4, “Working with Tables”, on page 47.

See also settextcolor (p. 467) for details on setting cell colors. See setmerge (p. 466) for cell merging, and comment (p. 247) for adding comments to cells.

setmerge

Table Proc

 

 

Merges/unmerges one or more table cells.

Syntax

 

Table Proc:

table_name.setmerge(cell_range)

where cell_range describes the table cells (in a single row) to be merged. The cell_range specifications are given by:

first_cell[:]last_cell, Left (right) cell of the selection range (specified in “cellfirst_cell[,]last_cell format), followed by right (left) cell of the selection

range (specified in “cell” format), separated by a “:” or “,” (e.g., “A2:C2”, “A2,C2”, or “R2C1:R2C3”, “R2C1,R2C3”). Merge all cells in the region defined by the first column and last column for the specified row.

cell_row[,] first_cell_col[,] cell_row[,] last_cell_col

Left (right) cell of the selection range (specified in “row[,] col” format), followed by right (left) cell of the selection range (specified in “row[,] col” format, with a fixed row), separated by a “,” (e.g., “2,A,2,C” or “2,1,2,3”). Merge all cells in the row defined by the first column and last column identifier.

If the first specified column is less than the last specified column (left specified before right), the cells in the row will be merged left to right, otherwise, the cells will be merged from right to left.The contents of the merged cell will be taken from the first non-empty cell in the merged region. If merging from left to right, the leftmost cell contents will be used; if merging from right to left, the rightmost cell contents will be displayed.

settextcolor—467

If you specify a merge involving previously merged cells, EViews will unmerge all cells within the specified range.

Examples

tab1.setmerge(a2:d2)

tab1.setmerge(2,1,2,4)

merges the cells in row 2, columns 1 to 4, from left to right.

tab2.setmerge(r2c5:r2c2)

merges the cells in row 2, columns 2 to 5, from right to left. We may then unmerge cells by issuing the command using any of the previously merged cells:

tab2.setmerge(r2c4:r2c4)

unmerges the previously merged cells.

Note that in all cases, the setmerge command must be specified using cells in a single row. The command:

tab3.setmerge(r2c1:r3c5)

generates an error since the cell specification involves rows 2 and 3.

Cross-references

For additional discussion of tables see Chapter 4, “Working with Tables”, on page 47.

See also setlines (p. 465).

settextcolor

Table Proc

 

 

Changes the text color of the specified table cells.

Syntax

Table Proc:

table_name.settextcolor(cell_range) color_arg

where cell_range describes the table cells to be modified, and color_arg specifies the color to be applied to the text in the cells. See setfillcolor (p. 453) for the syntax for cell_range and color_arg.

Examples

To set an orange text color for the cell in the second row and sixth column of TAB1, you may use:

468—Appendix B. Command Reference

tab1.settextcolor(f2) @rgb(255, 128, 0)

tab1.settextcolor(2,f) @RGB(255, 128, 0)

tab1.settextcolor(2,6) orange

tab1.settextcolor(r2c6) orange

You may also specify a blue color for the text in an entire column, or an entire row,

tab1.settextcolor(C) @RGB(0, 0, 255)

tab1.settextcolor(2) blue

or a green color for the text in cells in a rectangular region:

tab1.settextcolor(R2C3:R3C6) green

tab1.settextcolor(r2c3,r3c6) green

tab1.settextcolor(2,C,3,F) @rgb(0, 255, 0)

tab1.settextcolor(2,3,3,6) @rgb(0, 255, 0)

Cross-references

For additional discussion of tables see Chapter 4, “Working with Tables”, on page 47.

See setfont (p. 455)and setfillcolor (p. 453) for details on changing the text font and cell background color.

setwidth

Alpha Proc | Coef Proc | Group Proc | Matrix Proc | Series Proc | Rowvector Proc | Sym Proc | Table Proc | Vector Proc

Set the column width for selected columns in an object spreadsheet.

Syntax

Object Proc:

object_name.setwidth width_arg

Object Proc:

object_name.setwidth(col_range) width_arg

where col_range is either a single column number or letter (e.g., “5”, “E”), a colon delimited range of columns (from low to high, e.g., “3:5”, “C:E”), or the keyword “@ALL”, and width_arg specifies the width unit value, The width unit is computed from representative characters in the default font for the current table (the EViews table default font at the time the table was created), and corresponds roughly to a single character. width_arg values may be non-integer values with resolution up to 1/10 of a width unit.

Examples

tab1.setwidth(2) 12

sets the width of column 2 to 12 width units.

Соседние файлы в папке Docs