Caption property

Official Content
This documentation is valid for:
Sets the text that a control (Text Block control, Button controls, etc.) should display.


control. Caption = Expression

Type returned: Text

    Is the name of a control inserted in the form.

    Is the text that will be displayed.


Objects: Transaction, Web Panel, Panel, Web Panel
Platforms: Web(.Net, Java)
Controls: Button, Text Block


To see values that can be set at design time take a look at Dynamic Property Values. At runtime, any expression evaluating to a string can be assigned to it.

In Web forms determines the text displayed in the browser's title toolbar; and for other controls determines the text displayed in a control.

Runtime/Design time

This property applies both at run-time and at design-time.


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

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

The Caption property can also be used in a Panel for Smart Devices or a Work With for Smart Devices to change the control caption title. It can be used in the Start, Refresh or user event only.

See Also

Button control
Text Block control