Caption property

Official Content
This documentation is valid for:
Sets the text to be displayed by a control (Text Block control, Button controls, etc.)

Syntax

control. Caption = Expression

Type returned: Text

Where: 
Control
    Is the name of a control inserted in the form.

Expression 
    Is the text that will be displayed.

Scope

Objects: Panel, Transaction, Web Panel
Generators: .NET, .NET Framework, Angular, Java
Controls: Button, Text Block

Description

The Caption property may be used in:

  • The Start event,
  • The Refresh event,
  • User events.

At runtime, any character expression can be assigned to it.

See values that can be set at design time at Dynamic Property Values.

In Web forms, this property determines the text to be displayed in the browser's title toolbar. For other controls, it determines the text to be displayed for the control.

Runtime/Design time

This property applies both at runtime and at design time.

Samples

The following rules are defined in a Transaction object:

Form.Caption = 'My Form - Update' if update;
Form.Caption = 'My Form - Delete' if delete;
Form.Caption = 'My Form - Insert' if insert;

In this example, changes in the browser's title will depend on the current mode (insert, delete, or update).

See Also

Button control
Text Block control