fieldvideo
Sets the video attributes of the specified field.
fieldvideo Field,AttributeList
Parameters
Parameter | Data Type | Description |
---|---|---|
Field |
String |
Literal name of the field where the video properties are set, or a string, variable, function or parameter that evaluates to the name. If omitted, the current field is used. |
AttributeList |
String |
If AttributeList is omitted, DEF is assumed. One of:
|
Return Values
None.
Use
Use in Form and Report components.
Description
The fieldvideo statement dynamically sets the video attributes of Field for the current occurrence. You can use color coding to highlight dangerous or slow choices, or to highlight fields which contain data that requires urgent processing.
To set the video properties as data is read, place the fieldvideo statement for the field after the read statement in the read trigger.
The structure editor function ^CLEAR also resets the field video attributes. Since the structure editor function ^RETRIEVE carries out an implicit ^CLEAR, this also resets field video attributes.
Note: Video attributes set with the fieldvideo instruction override the attributes set by the $ACTIVE_FIELD assignment setting.
Video attributes
Attribute Code | Description |
---|---|
BLI
|
Blinking |
BOR
|
Border |
BRI
|
Bright |
HLT
|
Use system highlight color. Note: This attribute always takes precedence over other video attributes that may be specified. |
INV
|
Inverse |
UND
|
Underline |
COL= n
|
Set color to color code n, the sum of the color numbers for foreground and background. |
Using fieldvideo
The following example loops through all the occurrences to find whether the name the user entered exists. If it does not, the fieldvideo statement is used to highlight the incorrect name. F2. E1 is a character string field containing a name.
; field : NAMEDUMMY.E1 trigger Detail if (F2.E1 != NAMEDUMMY) $curOcc$ = $curocc $name$ = NAMEDUMMY $counter$ = 1 repeat setocc "E1",$counter$ $counter$ = ($counter$ + 1) until ((F2.E1 = $name$) | ($status < 0)) if ($status < 0) message "%%$name$ not available." setocc "E1",$curOcc$ fieldvideo NAMEDUMMY, "BRI,UND,BLI" $prompt = NAMEDUMMY.E1 return (0) endif endif $prompt = F2.E2 end ; Detail