table.setfillcolor

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

fnarita
Posts: 15
Joined: Thu Jun 04, 2009 11:15 am

table.setfillcolor

Postby fnarita » Mon Jul 13, 2009 11:32 am

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
Attachments
full_est_part2_for_post.prg
My program code that includes a loop of interest.
(4.5 KiB) Downloaded 426 times
annual.wf1
My workfile to use.
(518.99 KiB) Downloaded 422 times

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13585
Joined: Tue Sep 16, 2008 5:38 pm

Re: table.setfillcolor

Postby EViews Gareth » Mon Jul 13, 2009 11:38 am

change:

Code: Select all

setfillcolor (!row1,!col)
to:

Code: Select all

setfillcolor(!row1,!col)

fnarita
Posts: 15
Joined: Thu Jun 04, 2009 11:15 am

Re: table.setfillcolor

Postby fnarita » Mon Jul 13, 2009 11:51 am

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


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests