Creating Attribute Sets for Field Components
Go Up to Working with field components Index
When several fields in the datasets used by your application share common formatting properties (such as Alignment, DisplayWidth, DisplayFormat, EditFormat, MaxValue, MinValue, and so on), it is more convenient to set the properties for a single field, then store those properties as an attribute set in the Data Dictionary. Attribute sets stored in the data dictionary can be easily applied to other fields.
Note: Attribute sets and the Data Dictionary are only available for BDE-enabled datasets.
To create an attribute set based on a field component in a dataset
- Double-click the dataset to invoke the Fields editor.
- Select the field for which to set properties.
- Set the desired properties for the field in the Object Inspector.
- Right-click the Fields editor list box to invoke the context menu.
- Choose Save Attributes to save the current field's property settings as an attribute set in the Data Dictionary.
The name for the attribute set defaults to the name of the current field. You can specify a different name for the attribute set by choosing Save Attributes As instead of Save Attributes from the context menu.
Once you have created a new attribute set and added it to the Data Dictionary, you can then associate it with other persistent field components. Even if you later remove the association, the attribute set remains defined in the Data Dictionary.