Problem Note 2846: Color of text entered may not match data foreground color
If you create a Data Table object or a Table Viewer Control in a SAS/AF
FRAME entry and you set the data foreground color to a color of your
choice, the color of the characters as you enter them in a cell may not
display in the custom data foreground color until you press ENTER in the
cell or move to the next cell.
For example, if you set the data foreground color to orange with the
_setDataColor method (Data Table class) or the dataForegroundColor
attribute (Table Viewer Control), as you enter a value into a cell, the
characters may appear in the cell in a color other than orange. Once
you press ENTER or leave that cell, you will then see the characters
dipslay in the color orange.
To circumvent this problem, you can set the data foreground color via
the model or you can turn off the default in_cell_controls. The SAS
Component Language (SCL) statements or attribute settings for each of
these alternatives is listed below, first for the Data Table class and
second for the Table Viewer control.
With the Data Table class, use the following statements in the FRAME's
SCL entry to set data foreground color for all columns displayed in your
data table:
length colname $ 8;
columnList=makelist();
call send(tableid,'_getDisplayedColumns',columnList);
numcols=listlen(columnList);
do i=1 to numcols;
colname=getitemc(columnList,i);
call send(tableid,'_setColumnAttribute',colname,'dfcolor',
'color-of-your-choice');
end;
if columnList then columnList=dellist(columnList);
To turn off in_cell_controls in a data table, use the following
statements in the FRAME's SCL entry:
tableAttrs=makelist();
rc=insertc(tableAttrs,'n',-1,'in_cell_controls');
call send(tableid,'_setAttributes',tableAttrs);
if tableAttrs then tableAttrs=dellist(tableAttrs);
With the Table Viewer class, you can set the data foreground color for
each of the columns displayed in your Table Viewer by opening the Column
Properties window via the columns attribute for your SAS Data Set Model.
In the Column Properties window, click on the Colors tab. Select all
the columns in the Columns list via an extended selection by first
pressing the SHIFT key and then holding it down while selecting the last
column in the list with a single mouse click. Then set the data
foreground color to the color of your choice.
To turn off in_cell_controls in a table viewer, use the following
statements in the FRAME's SCL entry:
tableAttrs=makelist();
rc=insertc(tableAttrs,'n',-1,'in_cell_controls');
tableviewer1._setAttributes(tableAttrs);
if tableAttrs then tableAttrs=dellist(tableAttrs);
Operating System and Release Information
| Product Family | Product | System | Reported Release | Fixed Release* |
| SAS System | SAS/AF | OpenVMS Alpha | 8 TS M0 | 8.2 TS2M0 |
| CMS | 8 TS M0 | 8.2 TS2M0 |
| 64-bit Enabled HP-UX | 8 TS M0 | 8.2 TS2M0 |
| HP-UX | 8 TS M0 | 8.2 TS2M0 |
| ABI+ for Intel Architecture | 8 TS M0 | 8.2 TS2M0 |
| z/OS | 8 TS M0 | 8.2 TS2M0 |
| OS/2 | 8 TS M0 | 8.2 TS2M0 |
| IRIX | 8 TS M0 | 8.2 TS2M0 |
| 64-bit Enabled Solaris | 8 TS M0 | 8.2 TS2M0 |
| Microsoft Windows NT Workstation | 8 TS M0 | 8.2 TS2M0 |
| Microsoft Windows 95/98 | 8 TS M0 | 8.2 TS2M0 |
| OpenVMS VAX | 8 TS M0 | 8.2 TS2M0 |
| Microsoft Windows 2000 Professional | 8 TS M0 | 8.2 TS2M0 |
| Solaris | 8 TS M0 | 8.2 TS2M0 |
| 64-bit Enabled AIX | 8 TS M0 | 8.2 TS2M0 |
| Tru64 UNIX | 8 TS M0 | 8.2 TS2M0 |
| AIX | 8 TS M0 | 8.2 TS2M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Type: | Problem Note |
| Priority: | medium |
| Date Modified: | 2000-07-05 13:45:27 |
| Date Created: | 2000-06-16 13:40:55 |