Caption property

The Caption property can be used either as a form property or a component property.

Caption as a form property

At the form level, Caption property text is displayed in the title bar of the open form and in the title bar of the application window. A caption is required for each form.

A caption differs from the form's name and can differ from its label in the Explorer.

Note: We recommend that string names for form captions consist of the prefix f and the form name (for example, fBankReconciliations for the form Bank Reconciliations). You can type literal text for the caption in the properties sheet, but specifying a translatable string is recommended.

Caption as a component property

Use the Caption property to specify the component label that is displayed on the form.

You can specify a component caption in several ways:

  • Select a string from the list of string names.
  • Click the button to create or edit a string.
  • Use the COMPONENTS keyword.
  • Enter literal text.
Note: We do not recommend the use of literal text. Use of strings supports consistency and eases customization and translation. For example, changing the value of the string sPartNo from "Part No." to "Part Number" alters all the forms and components that use the string. If literal text is used for each caption, then each form and each component must be updated individually.

To display "\n" instead of it being interpreted as a new line, set the No Interpret New Lines property to TRUE.