Page 1 of 1

table.setfillcolor

Posted: Mon Jul 13, 2009 11:32 am
by fnarita
Hi,

I keep having an error in using "setfillcolor" procedure of the table class object.

I'd like to turn the cell into red if the estimated coefficient in the cell has an unexpected sign.

I wrote a loop that executes the following two senteces;

Code: Select all

EST2_PANEL_ERRI3_S_1.setfillcolor (!row1,!col) @rgb(!r, !g, !b) EST2_PANEL_ERRI3_S_1.setfillcolor (!row2,!col) @rgb(!r, !g, !b)
"EST2_PANEL_ERRI3_S_1" is a table object.

A typical error that I have is as follows.
Invalid cell range, in "DO_ EST2_PANEL_ERRI3_S_1.SETFILLCOLOR (3,4) @RGB(255, 0, 0)"
Any execution like this ends up with a similar error, regardless of the row and/or column numbers.
So, I suspect that I had a wrong syntax, but I think I correctly follow what is written in the help file as below;
Examples:
To set a purple background color for the cell in the second row and third column of TAB1, you may use any of the following:

Code: Select all

tab1.setfillcolor(C2) @rgb(128, 0, 128) tab1.setfillcolor(2,C) @RGB(128, 0, 128) tab1.setfillcolor(2,3) purple tab1.setfillcolor(r2c3) purple
Could anyone help me?

I attached my workfile and program code.
Any comment and/or hint will be highly appreciated.

Thank you very much,
Futoshi

Re: table.setfillcolor

Posted: Mon Jul 13, 2009 11:38 am
by EViews Gareth
change:

Code: Select all

setfillcolor (!row1,!col)
to:

Code: Select all

setfillcolor(!row1,!col)

Re: table.setfillcolor

Posted: Mon Jul 13, 2009 11:51 am
by fnarita
Dear Gareth,

Thank you so much for your really quick and precise help!!
The code works well after deleting blanks.

Honestly, I'm a bit embarrassed.... :oops:
Usually, Eviews nicely interprets such blanks, so I didn't think it matters.
I will check them from the next time.

I really appreciate your help!
Thank you very much, Gareth!!
Futoshi