Sets the string that is used to identify a control or other object in the user interface.
Applies To
-
Check boxes
-
Codeunits
-
Command buttons
-
Dataports
-
Fields
-
Forms
-
Frames
-
Indicators
-
Labels
-
Menu buttons
-
Menu items
-
Option buttons
-
Pages
-
Picture boxes
-
Reports
-
Tables
-
Text boxes
-
XMLports
Remarks
The CaptionML property is multilanguage enabled, so it can contain a list of text strings in different languages. The string that is used is selected according to the user's language settings. For more information, see Working with Multilanguage Functionality.
The CaptionML property has the following format.
<Language ID>=<caption>
<Language ID> is the standard Windows three-letter language ID, and <caption> is the caption text for this language. Use semicolons to separate entries.
The following example shows a CaptionML value.
DAN=Navn;DEU=Name;ESP=Nombre;FRA=Nom
In this example, values are set for Danish (DAN), German Standard (DEU), Spanish Traditional Sort (ESP), and French Standard (FRA).
You can enter values for the CaptionML property in two ways:
-
If you enter a value for the Caption Property, then the CaptionML property is set to the value of the current language. For example, if the current system language is Danish, then a value of DAN =<value> is placed in the CaptionML field.
-
If you click the AssistButton in the CaptionML value field, then the Multilanguage Editor opens and displays two columns: Language and Value. The Language column is populated with all languages that are defined by Windows. You specify the CaptionML value for a language by entering a value in the Value field for that language. You need to close this form by clicking OK. If you press ESC to close this form, then the CaptionML field is not updated.
The following table shows how the default caption is determined for the various objects in C/SIDE.
Object | Default caption |
---|---|
Table |
Name property |
Field |
Name property |
Codeunit |
Name property |
Form |
Name property |
Report |
Name property |
Dataport |
Name property |
XMLport |
Name property |
Command button and menu item |
PushAction or Name property |
Menu button, indicator, text box, picture box, and frame |
Name property |
Check box |
OptionValue or Name property |
Label Controls
The Caption Property of a label control is automatically set to the Caption Property of the parent control (as specified by the ParentControl Property of the label). When you add labels to a form by using a form wizard or by selecting the Add Label check box in the Toolbox when a control is inserted, the parent control is set by default. If a label control does not have a parent control, then the Name Property of the label control is used as the caption.
When a label has a parent control and this parent control is related to a table, the caption will be taken from the first available value in following list:
-
The CaptionML of the label itself.
-
The CaptionML of the parent control.
-
The CaptionML of the table field that the parent control relates to.
-
The Name property of the parent control.
-
The Name property of the table field that the parent control relates to.
-
The Name property of the label itself.
For example, the CaptionML property for a database field with the name "Name" contains:
DAN=Navn,DEU=Name,FRA=Nom
You create a text box with a label for this field where the label has the text box as its parent control. You do not set a value for the Caption field of the CaptionML property of the label. The label will get the caption "Navn" if the user selects Danish as the language, "Name" for German, and "Nom" for French (rule 3). If you delete the CaptionML values for the database field, then the user will see "Name" as the caption of the label no matter what language is selected (rule 5).
See Also
© 2010 Microsoft Corporation. All rights reserved.