Caption property

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

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.

Description

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.

Run-time/Design-time

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

Samples

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.

Scope

Objects: Panel for Smart Devices, Transaction, Web Panel, Work With for Smart Devices
Platforms: Web(.Net, Java)
Controls: Button, Text Block

See Also

Button control
Text Block control

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.