Table display object

display_object = field_id | file_id | record_id

The object that defines the columns in the table. The headings of the fields in the display object are used as the column headings

If the column widths have not been explicitly set by the cell_width field in the table cell property record, the column widths are calculated to fit the width of the data and the column heading. The maximum width of any single column is limited to 255 characters.

If all the headings in the display object are null strings ( “” ), and there are no button type headings defined in the table cell property record, the table has no column headings, and the first row of the table is positioned where the headings would otherwise have been. Note that a single space ( ” ” ) does not count as a null string.

A display object must always be defined if the source object is a function. Otherwise, if no display object is defined, the source object is also used as the display object.

field_id

Use of a field as a display object produces a table with a single column of values. A dimensioned field is not required. The source object must be a field (field_id) or function (func_id). If it is a field, the values from the source object are assigned and updated automatically. If it is a function, the function must assign the required values.

file_id, record_id

These display objects are used for multi-columnar tables, with one column for each field in the file or record. The source object must be a file (file_id), !record (record_id) or function (func_id). If it is a file or !record, each field name in the display object should be identical to the name of the field in the source object which is to be displayed. This enables Sculptor to assign and maintain the values dynamically.

If the source object is a function, the values must be assigned within the function. It may still be possible to facilitate this by using field names in the display object which are identical, for example, to field names in a file processed by the function. Then the form:

DisplayObj = file_id | record_id

may be used in the source function to assign all values from the file or record buffer to the identically named fields in the display object (which has in this example been given the argument name “DisplayObj” by the source function).

Note

If an editable table has a display object that differs from the source object, is may be appropriate to assign the edit mode flag EM_SYNC_SOURCE to the table. This causes the source object to be updated when a cell loses focus. If this flag is not set, only the display object is updated.


RELATED TOPICS

Tables

Table source object

Table cell property record