Page 1 of 1

Printing one caption in BOLD

Posted: Tue Sep 15, 2009 2:34 pm
by Susan Smith
Hi again,

I know how to default my entire window to use BOLD text in the OPEN #0 statement. But how do I specify it in an print fields statement for just ONE caption only? Can someone show me a simple print fields statement with the appropriate attribute wording? (please)

Thank you.

-- Susan

Posted: Tue Sep 15, 2009 2:47 pm
by gtisdale
In order to change the attributes of print fields statements in 4.18+ you MUST use attribute substitution statements because only navigation attributes are allowed outside of the substitution parameters (That's not entirely true, but if you go in this direction life is much easier).

EXECUTE "config attribute [PFKEY]N/#8F0107:T,font=Times New Roman:medium:bold"

is an example of setting an attribute. You would then use the attribute i your print fields/rinput fields statement.

FNGeorge

Posted: Tue Sep 15, 2009 3:41 pm
by Susan Smith
Thank you George, that helped a lot. In fooling around with this, I discovered that you don't have to specify colors in the attribute WITH the font if you don't want to, but you DO have to include the the leading "N," or you will get some surprising results. Is that your experience?

10000 EXECUTE "CONFIG ATTRIBUTE [ABC]N,FONT=ARIAL:BOLD:MAX"
10010 PRINT #0, FIELDS "10,10,C,[ABC]":"TEST DATA"

resulted in BOLD BLACK TEXT on default background as I expected

but when I left out the "N" component:

10000 EXECUTE "CONFIG ATTRIBUTE [ABC]FONT=ARIAL:BOLD:MAX"
10010 PRINT #0, FIELDS "10,10,C,[ABC]":"TEST DATA"

resulted in WHITE TEXT on a BLUE BACKGROUND

Interesting. I'm sure this is all very simple. But apparently, so am I :roll:

-- Susan

Posted: Tue Sep 15, 2009 6:27 pm
by gordon
From 4.18 Release Notes-

Note- Field attribute specifications normally should appear in the
following order:

* [attrib-name]
* override display attributes (Q, S, T etc.)
* action attributes (A, E, X etc.)
* color
* font (in ATTRIBUTE statements only)

Note- Config [attributes] do NOT store actions. They only store
screen display characteristics.