Set the video properties for fields of the current occurrence.

curoccvideo  {/inner | /up}  {/off}  {Entity}  {, AttributeList}

Example: curoccvideo "CUSTOMER", "HLT"






Apply the video properties to all inner entities of the current occurrence, but not to the specified entity itself.


Apply the video properties only to inner entities that are painted as up entities within the specified entity.


Turn off video highlighting for the current occurrence; if the /inner switch is present, video highlighting is turned off for inner entities only.




Data Type




Name of an entity. If omitted, only the current entity is affected.

If Entity is "*", the video properties are applied to all entities in the form.



One of:

  • DEF—sets thze default video attributes for the current occurrence. (The default video attributes are determined by the assignment setting $DEF_CUROCC_VIDEO.)
  • NON—sets no special video attributes for the current occurrence. In character mode, this means that fields, which appear in inverse by default, appear in normal video; this can create a sort of highlighting effect.
  • One or more video attributes, separated by GOLD semicolons (;) or by commas (,).

If omitted, DEF is assumed.

Video Attributes

Video Attribute Codes
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.

Return Values



Use in Form components.


The curoccvideo statement sets the video properties for the fields of the current occurrence. Used without a switch, curoccvideo applies these properties to fields of Entity.

Using the /inner or /up switch excludes the calling entity, so only inner or upper entities, respectively, are altered with these switches. For example, the following statement affects only the inner entities of MyOuterEntity:

curoccvideo/inner "MyOuterEntity", "BRI"

Note:  The curoccvideo statement does not affect an entity that is painted with a single occurrence, unless that entity is painted as an up entity and the outer entity is painted with multiple occurrences.

Defining Default Video Attributes for the Current Occurrence

You can use the assignment setting $CUROCC_VIDEO to enable the highlighting of the active occurrence in all form components of the application, using the default video attributes defined with $DEF_CUROCC_VIDEO. This acts as if the following ProcScript statement were executed for each form:

curoccvideo "*","DEF"

If curoccvideo sets the video attribute to HLT, and the system highlight color is the same as the color used by Windows to highlight text selected in an edit box, the difference between selected and non-selected text will not be visible to the user. In this case, you can define a different color combination using the $CUROCC_VIDEO_HLT assignment setting. For more information, see $CUROCC_VIDEO, $DEF_CUROCC_VIDEO, and $CUROCC_VIDEO_HLT.

Overriding Current Occurrence Video Attributes

Video attributes that are defined for the current occurrence are overridden by those defined with the assignment setting $ACTIVE_FIELD. This allows the active field to be visible within the active occurrence (if you have chosen appropriate video properties).

Video attributes set with fieldvideo override both those set with $ACTIVE_FIELD and those set for the current occurrence, unless $ACTIVE_FIELD_FIRST is also set. For more information, see $ACTIVE_FIELD and $ACTIVE_FIELD_FIRST.

Using curoccvideo

The following example causes the fields of the current occurrences of all inner entities that are painted as up entities within the entity Customer to appear with white letters on a blue background. The color number is determined by adding 56 (black foreground) and 1 (blue background).

curoccvideo/up "CUSTOMER", "COL=57"

The following example turns off highlighting of fields of the current occurrences of all inner entities within the entity ENT1, but not of ENT1 itself.

curoccvideo/inner/off "ENT1"

Related Topics