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.
Field component properties
Property |
Purpose |
Alignment |
Left justifies, right justifies, or centers a field contents within a data-aware component. |
ConstraintErrorMessage |
Specifies the text to display when edits clash with a constraint condition. |
CustomConstraint |
Specifies a local constraint to apply to data during editing. |
Currency |
Numeric fields only. True: displays monetary values.False (default): does not display monetary values. |
DisplayFormat |
Specifies the format of data displayed in a data-aware component. |
DisplayLabel |
Specifies the column name for a field in a data-aware grid component. |
DisplayWidth |
Specifies the width, in characters, of a grid column that display this field. |
EditFormat |
Specifies the edit format of data in a data-aware component. |
EditMask |
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). |
FieldKind |
Specifies the type of field to create. |
FieldName |
Specifies the actual name of a column in the table from which the field derives its value and data type. |
HasConstraints |
Indicates whether there are constraint conditions imposed on a field. |
ImportedConstraint |
Specifies an SQL constraint imported from the Data Dictionary or an SQL server. |
Index |
Specifies the order of the field in a dataset. |
LookupDataSet |
Specifies the table used to look up field values when Lookup is True. |
LookupKeyFields |
Specifies the field(s) in the lookup dataset to match when doing a lookup. |
LookupResultField |
Specifies the field in the lookup dataset from which to copy values into this field. |
MaxValue |
Numeric fields only. Specifies the maximum value a user can enter for the field. |
MinValue |
Numeric fields only. Specifies the minimum value a user can enter for the field. |
Name |
Specifies the component name of the field component within Delphi. |
Origin |
Specifies the name of the field as it appears in the underlying database. |
Precision |
Numeric fields only. Specifies the number of significant digits. |
ReadOnly |
True: Displays field values in data-aware controls, but prevents editing. False (the default): Permits display and editing of field values. |
Size |
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. |
Tag |
Long integer bucket available for programmer use in every component as needed. |
Transliterate |
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. |
Visible |
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.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|