ProtoField Attribute
Data Type: FormField
4GL Access: RW1
The ProtoField attribute is a prototype field that represents the sample cell for the column. 4GL applies any changes you make to this FormField object to all the cells within the table field for this column field (unless cell attributes are turned on for the column).
For example, assume that you have a table field, emptable, that displays four rows, and you want to change the background color for the salary column. The following statement changes the background color of all four cells in the salary column field to red (even when new rows are scrolled into view):
EntryField(field(emptable[*].salary).ProtoField).
BgColor = CC_RED;
Because FormField (ProtoField's data type) is a high-level class, most of the useful attributes are related to its subclasses, the actual field types. Consequently, you must cast references to the ProtoField attribute to the appropriate field type.
OpenROAD uses the ProtoField template to provide initial settings for CellAttribute objects when you turn them on in a column. If you change the ProtoField object after you turn cell attributes on, the changes that you make are visible only in new rows added to the array after the changes; existing rows are not affected. (To change the cells in those rows, use the CellAttribute objects.)
Last modified date: 12/20/2023