COMMENT action attribute
The COMMENT attribute defines hint for the user about the
action.
Syntax 1 (Dialog action handlers and form action defaults):
COMMENT = [%]"string"
- string is the comment to display, with the % prefix for a localized string.
Syntax 2 (Global .4ad action defaults file):
comment = "string"
- string is the comment to display. Use
<LStr/>child element for a localized string.
Usage
Use the COMMENT attribute to define a description for the action.
This text will typically be displayed as a hint for the corresponding 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).
Action view decoration attributes TEXT,
IMAGE and COMMENT defined at dialog level with ON ACTION
name ATTRIBUTES(...) apply only to implicit action views
such as default action views, context menu action views and rowbound action views: The
explicit action views (such as buttons in the form layout) will not get dialog-level
attribute values. Note that the COMMENT attribute will not be rendered on context
menu and rowbound action views. See also Dialog action handler attributes
for more details.
Example
-- As action handler attribute
ON ACTION print ATTRIBUTES(COMMENT="Prints current record")
-- As action default
ACTION DEFAULTS
ACTION print (COMMENT="Print current order information")
END
-- In a form buttom, using a localized string id
BUTTON b1: print, COMMENT=%"actions.print.comment";
-- In a global action defaults file with a localized string id
<ActionDefault name="zoom" comment="Opens a zoom window" ... >
<LStr comment="actions.zoom.comment" />
</ActionDefault>