Reference Type: Supported, Category: XGF Function Library, Integration Agreement: 3173
This API changes individual video attributes for subsequent screen
Use this API to change individual video attributes for subsequent output. This API is different from SETA^XGF in that individual video attributes can be set without affecting all video attributes at once.
A call to the PREP^XGF(): Screen/Keyboard Setup API must be made at some point prior to calling CHGA^XGF.
The attribute codes are not case sensitive. You can append them if you want to set more than one attribute. If you include more than one attribute, their order is not important.
B0 and B1 turn off and on the blink attribute; I0 and I1 turn off and on the intensity attribute; R0 and R1 turn off and on the reverse attribute; U0 and U1 turn off and on the underline attribute. E1 turns off all attributes. G0 and G1 turn off and on recognition of an alternate graphics character set so that you can use special graphic characters, in particular those set up by Kernel's GSET^%ZISS API. To use graphics characters, be sure you turn on graphics first (with G1) and turn graphics off afterwards (with G0).
The change in attribute remains in effect until another CHGA^XGF, PREP^XGF(): Screen/Keyboard Setup, or SETA^XGF(): Screen Video Attributes API call is made. If you want only a temporary change in attribute, SAY^XGF may be a better function to use.
(required) Codes are as follows:
This variable always holds the current screen attribute coded as a single character, and is updated when you call CHGA^XGF.
NOTE: See also: SETA^XGF(): Screen Video Attributes API.
To clear the screen in blinking, reverse video and high intensity, do the following:
To print Hello World, do the following:
>D CHGA^XGF("I1"),SAY^XGF(,,"Hello ") >D CHGA^XGF("U1"),SAY^XGF(,,"World")
To draw the bottom of a small box, do the following:
>D CHGA^XGF("G1") >D SAY^XGF(,,IOBLC_IOHL_IOHL_IOBRC) >D CHGA^XGF("G0")
August 26, 2011