To edit the display properties of a selected field component, switch to the Properties page on the Object Inspector window. The following table summarizes display properties that can be edited.
Table 19.3 Field component properties Purpose
Left justifies, right justifies, or centers a field contents within a data-aware component.
Specifies the text to display when edits clash with a constraint condition.
Specifies a local constraint to apply to data during editing.
Numeric fields only. True: displays monetary values. False (default): does not display monetary values.
Specifies the format of data displayed in a data-aware component. Specifies the column name for a field in a data-aware grid component. Specifies the width, in characters, of a grid column that display this field. Specifies the edit format of data in a data-aware component. Limits data-entry in an editable field to specified types and ranges of characters, and specifies any special, non-editable characters that appear within the field (hyphens, parentheses, and so on).
Specifies the type of field to create.
Specifies the actual name of a column in the table from which the field derives its value and data type.
Indicates whether there are constraint conditions imposed on a field. Specifies an SQL constraint imported from the Data Dictionary or an SQL
Specifies the table used to look up field values when Lookup is True. Specifies the field(s) in the lookup dataset to match when doing a lookup. Specifies the field in the lookup dataset from which to copy values into this field.
Numeric fields only. Specifies the maximum value a user can enter for the field.
Numeric fields only. Specifies the minimum value a user can enter for the field.
Specifies the component name of the field component within Delphi. Specifies the name of the field as it appears in the underlying database. Numeric fields only. Specifies the number of significant digits.
Table 19.3 Field component properties (continued)
True: Displays field values in data-aware controls, but prevents editing. False (the default): Permits display and editing of field values.
Specifies the maximum number of characters that can be displayed or entered in a string-based field, or the size, in bytes, of TBytesField and TVarBytesField fields.
Long integer bucket available for programmer use in every component as needed.
True (default): specifies that translation to and from the respective locales will occur as data is transferred between a dataset and a database. False: Locale translation does not occur.
True (the default): Permits display of field in a data-aware grid. False: Prevents display of field in a data-aware grid component. User-defined components can make display decisions based on this property.
Not all properties are available for all field components. For example, a field component of type TStringField does not have Currency, MaxValue, or DisplayFormat properties, and a component of type TFloatField does not have a Size property.
While the purpose of most properties is straightforward, some properties, such as Calculated, require additional programming steps to be useful. Others, such as DisplayFormat, EditFormat, and EditMask, are interrelated; their settings must be coordinated. For more information about using DisplayFormat, EditFormat, and EditMask, see "Controlling and masking user input" on page 19-14.
Was this article helpful?