![]() ![]() |
Reference Type: Supported, Category: XGF Function Library, ICR#: 3173
The SAYU^XGF API outputs a string to the screen (with optional position and
attribute control), including the ability to underline an individual
character.
This API is similar to
SAY^XGF. The difference is that the first ampersand
(&) character has a special meaning in the output
string; it acts as a flag to indicate that the next character should be
underlined. You are only allowed one underlined character per call. Typically
you would use SAYU^XGF when writing a menu option's text, in order to underline
that option's speed key.
A call to the
PREP^XGF():
Screen/Keyboard Setup API must be made at some point prior to calling
SAYU^XGF. You can specify row and column parameters relative to the current
$X
and $Y by specifying + or - to increment or decrement
$X or
$Y by 1. You can increment or decrement by more than
1 if you add a number as
well (e.g., "-5" or "+10").
NOTE: You must use quotes to pass a
"+" or "-". Otherwise, to specify exact locations for row and
column, pass numbers.
If the first ampersand is followed by another
ampersand, this initial && is interpreted and displayed as
one ampersand character, &, and you still have the opportunity to use
a single ampersand as an underlining flag.
SAYU^XGF([row][,col,]str[,atr])
row: |
(optional) Row position to start WRITE. |
col: |
(optional) Column position to start WRITE. |
str |
(required) String to WRITE (& underlines next character). |
atr |
(optional) Video attribute with which to WRITE a
string. |
$X,$Y: |
Set to the position of the last character output. |
NOTE: See also: IOXY^XGF(): Screen Cursor Placement and SAY^XGF(): Screen String APIs.
For example, to print Save at row 5, column 10, do the following:
>D SAYU^XGF(5,10,"&Save") |