4. System Classes : CellAttribute Class
 
Share this page                  
CellAttribute Class
The CellAttribute class contains the attributes that you can set for an individual cell of a table field. OpenROAD does not automatically create cell attribute objects when you create a table field, because these objects create significant performance overhead. To access the attributes of an individual cell, you must turn on cell attributes by setting the HasCellAttributes toggle in the ColumnField's property sheet. You can also turn them on in your 4GL code.
For instructions to set this attribute in your code, see the Programming Guide.
The cell attributes let you change the look of a cell but they have no effect on the size of the cell, because one cell in a column cannot be a different size than others in the column.
After you turn on cell attributes for a column, you cannot use the column's ProtoField attribute to make changes to the existing rows in the array. You must use the CellAttribute object instead. This includes entry field templates. You must use the CellAttribute FormatString attribute instead. Changes made using the ProtoField attribute are visible only in rows added to the array after you turned on cell attributes.
Two commonly used CellAttribute attributes are HasDataChanged and BgColor. The HasDataChanged attribute indicates whether the user has made any interactive changes to the data in a cell. The BgColor attribute is often used to highlight the cell when a user enters the cell.
If you use the IsReverse attribute or any of the Color attributes to highlight a cell, set the table field's IsHighlighted attribute to FALSE. Taking this action prevents confusing color changes when a row takes the input focus.
Note:  You cannot turn on cell attributes for nested table fields.
Inherits From
Object Class (see Object Class)
Inherited By
None
Attributes
BgBitmap
BgColor
BgPattern
Cursor
FgBitmap
FgColor
FgPattern
FormatString
HasDataChanged
IsBold
IsItalic
IsPlain
IsReverse
IsUnderlined
OutlineColor
TypeFace
TypeFaceName
TypeSize
Methods
UpdBackground
UpdForeground