Catalog Entry Model: _preserveEntryColor |
Specifies whether to honor the attributes saved in the catalog
entry
CALL NOTIFY (viewer-name, '_preserveEntryColor', preserve);
|
Description |
specifies a setting |
|
|
'Y' |
preserves attributes |
|
|
'N' |
ignores attribute |
By default, the catalog entry viewer displays text in the color in
which it was saved in the catalog entry. This color can be saved in two ways:
- Some catalog entry types, such as LOG, OUTPUT, and SOURCE, sometimes
save information about the window elements with the catalog entry. By default,
these types of entries display the text in the color assigned to the element
by the SASCOLOR window. For example, an OUTPUT entry may have a title line,
a header line, and some data lines. By default, the catalog entry viewer
displays these lines with whatever is set by the _setTitleColor, _setHeaderColor,
and _setDataColor methods. The color set by the _setTextColor text viewer
method is used only for those lines that are not any of the color categories.
To display all lines in the color set by the _setTextColor method, call _preserveEntryColor
and specify 'N' for the preserve argument. As a result, the
viewer ignores the color categories (such as title, header, and data color)
in favor of the text color set by the _setTextColor method.
- Other catalog entry types, such as SCL, save the attribute string
with the catalog entry. By default, the catalog entry viewer honors the attribute
string color. The color set by the _setTextColor method is used only for those
lines that do not have an attribute string. To display all lines in the color
set by the _setTextColor method, call _preserveEntryColor and specify 'N'
for the preserve argument. As a result, the viewer ignores the
attribute color in favor of the text color set by the _setTextColor method.
These catalog entry types do not use the colors specified with methods that
reference window element colors, such as _setTitleColor.
In this example, text is red regardless of the attributes with which
the entry was saved:
call notify('textview',
'_preserve_entry_color_', 'N');
call notify('textview',
'_set_text_color_', 'red');
_setTextColor in the Text Viewer class.
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.