$curoccvideo

Set or return the video properties for fields of the current occurrence.

$curoccvideo(Entity {,"Option"}) { = AttributeList}

AttributeList = $curoccvideo(Entity {,"Option"})

Example:  $curoccvideo("CUSTOMER") = "HLT"

Parameters

Parameters
Parameter Data Type Description
Entity String Name of an entity, or "*". If omitted, only the current entity is affected.

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

Option String Comma-separated list specifying the occurrences to which the video attributes apply; valid options are:
  • inner—apply the video properties to all inner entities of the current occurrence, but not to the specified entity itself.
  • up—apply the video properties only to many entities that are drawn as up entities within the specified entity.
  • off—turn off video highlighting for the current occurrence; AttributeList is ignored. If you specify inner;off, video highlighting is turned off for inner entities only.
AttributeList String Uniface list of attributes; valid attributes are:
  • DEF—set the default video attributes for the current occurrence. (The default video attributes are determined by the assignment setting $DEF_CUROCC_VIDEO.)
  • NON—set 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 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

None

Use

Use in Form components.

Description

The $curoccvideo function sets or retrieves the video properties for the fields of the current occurrence. Used without an option, $curoccvideo applies these properties to fields of Entity.

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

$curoccvideo("MyOuterEntity", "inner") = "BRI"

Note:  The $curoccvideo function does not affect an entity that is used as a single occurrence, unless that entity is an up entity and the outer entity is drawn 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 forms of the application, using the default video attributes defined with $DEF_CUROCC_VIDEO. For more information, see $CUROCC_VIDEO and $DEF_CUROCC_VIDEO.

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_HLT.

Overriding Current Occurrence Video Properties

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 ("CUSTOMER","up") = "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.

vOptions = ""
putitem vOptions, -1, "inner"
putitem vOptions, -1, "off"
$curoccvideo ("ENT1",vOptions)

Related Topics

History
Version Change
9.1.01 Introduced