Video Attributes
Video attributes determine the Uniface index colors used in an application, and additional attributes such as bold, blink, bright and underline used character mode that can be used to highlight current fields and occurrences.
You can customize video attributes for Uniface objects at several levels in the application:
- At Application level, by using assignment settings.
- Form level, by changing the properties of the appropriate forms.
- Object level, by specifying any of the codes shown in the following table either as defaults—during the installation process—or in ProcScript statements.
Video Attribute Codes
The available attribute codes are shown in the following table:
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. |
Note: Not all of these video attributes work on all displays. You should experiment to find what works best.
Uniface Index Colors
The following tables describe the foreground and background colors when the Bright and Blink video attributes are set.
Number | Bright | Blink | Bright & blink |
---|---|---|---|
0 | dark gray | white | dark gray |
8 | dark blue | gray dark | blue |
16 | dark green | green | dark green |
24 | dark cyan | cyan | dark cyan |
32 | dark red | red | dark red |
40 | dark purple | purple | dark purple |
48 | dark yellow | yellow | dark yellow |
56 | dark gray | white | dark gray |
Number | Bright | Blink | Bright & blink |
---|---|---|---|
0 | gray | blue | light blue |
1 | blue | blue | light blue |
2 | green | blue | light blue |
3 | cyan | blue | light blue |
4 | red | blue | light blue |
5 | purple | blue | light blue |
6 | yellow | blue | light blue |
7 | white | blue | light blue |
Video Attributes and Character Shapes
Character shapes (such as underline, bold, and italic) can be mapped to video attributes. However, video attributes cannot be mapped to character shapes. Therefore, if a video attribute is assigned to a Uniface object that has a bold character shape, the bold character shape is overridden by the new video attribute, and is no longer bold.
Inverse
Inverse is the default video attribute for Unifields in Windows. No special color set is needed for inverse and it can be combined with any of the other four video attributes. By default, a Unifield has background color 7, and foreground color 0 (black characters on a white background). If you make the unifield non-inverse, the default combination is background color 0 and foreground color 56 (black characters on a gray background).
Background colors 0 and 7, and foreground colors
0 and 56 are opposites of each other; these are the system colors always used for inverse and
non-inverse fields, regardless of the chosen video attributes. So, when you specify the attribute
blink, foreground color 0 and background color 7 are still used on an Inverse field. However,
because blink is the attribute, the color set from blink is used: white characters on a blue
background. If any other color is specified (using COL=n
), the INV attribute is
ignored.
Applications developed on some platforms may require the use of the assignment setting $SWAP_COLORS for proper display of colors. For more information, see $SWAP_COLORS.
Setting Video Attributes
Uniface allows you to set video attributes for specific objects in ProcScript:
- For fields, you can use $fieldvideo or fieldvideo. For more information, see $fieldvideo and fieldvideo.
- For current occurrences, you can use $curoccvideo and curoccvideo. For more information, see $curoccvideo and curoccvideo.
Video attributes set in ProcScript usually override those set declaratively in the Uniface IDE, and those set in assignment files.
Assignment settings allow you to specify the video attributes used for highlighting the current field or occurrence, and for objects in character mode.
Assignment Setting | Description |
---|---|
$ACTIVE_FIELD | Set the video attributes for the current field. Overrides the attributes set for the current occurrence. |
$ACTIVE_FIELD_FIRST | Enable or disable the video attributes defined by $ACTIVE_FIELD to take precedence over those set by $fieldvideo and fieldvideo. |
$CUROCC_VIDEO | Enable the current occurrence in all form components of the application. |
$CUROCC_VIDEO_HLT | Set the colors used to highlight the
current occurrence when the following conditions apply:
In this case, the difference between selected and non-selected text will not be visible to the user, so it is useful to set an alternative color. |
$DEF_VIDEO | Set the default video attributes for fields. |
$DEF_CUROCC_VIDEO | Set the video attributes used to highlight the current occurrence in all form components of the application. |
Assignment Setting | Description |
---|---|
$CHECK_BOX | Set the video attributes for a check box in character mode |
$FORM_TITLE | Assign form title properties in character mode |
$LIST_BOX | Set the video attributes for a list box in character mode |
$MENU_BAR | Assign the position, video attributes, and behavior of menu bars. |
$MESSAGE_LINE | Assign the position and video attributes for the message line in character mode. |
$PROFILE_VIDEO | Set the video attributes for profile characters in Unifields. |
$RADIO_BUTTON | Set the video attributes for radio group buttons in character mode. |