TEXT action attribute

The TEXT attribute defines the label associated to the action.

Syntax 1 (Dialog action handlers and form action defaults):

TEXT = [%]"string"
  1. string defines the label for the action, with the % prefix for a localized string.

Syntax 2 (Global .4ad action defaults file):

text = "string"
  1. string is the text to display. Use <LStr/> child element for a localized string.


The TEXT attribute is used to define the label associated to an action, for example for a CHECKBOX form field or a BUTTON action view.

Consider using localized strings with the %"string-id" syntax, if you plan to internationalize your application.

This action attribute can be specified as action default attribute in a global .4ad file, in the ACTION DEFAULTS section of form files, as dialog action attribute (using ON ACTION name ATTRIBUTES(...)), or directly as action view attribute (in the form definition file).
Note: Action view decoration attributes such as TEXT, IMAGE and COMMENT defined at dialog level with ON ACTION name ATTRIBUTES(...) apply only to default action views. See Dialog action handler attributes for more details.


-- As action handler attribute

-- As form action default
  ACTION print (TEXT="Print")

-- As a CHECKBOX label
CHECKBOX cb01 = FORMONLY.checkbox01, 
                TEXT="OK" ... ;

-- As a BUTTON label, using a localized string id
BUTTON b1: print, TEXT=%"actions.print.label";

-- In a global action defaults file with a localized string id
<ActionDefault name="zoom" text="Zoom" ... >
   <LStr text="actions.zoom.label" />