Action views
An action view defines a form item that can trigger an action in the program.
Action views as satellite items
Below is
TOOLBAR
section defining a toolbar button using the
close
action name. Here no layout tag is used because the toolbar
item is part of the toolbar graphical object (it will not appear in the form layout
area):TOOLBAR
ITEM close (TEXT="Close")
END
Action views in grid-based container
In a GRID
container, the position and size of the element is defined with an
item tag, while the rendering and behavior is
defined in the ATTRIBUTES
section. Both parts are bound by the name of the item tag. The
item tag name is local to the .per file and is not available at runtime.
The example defines a
BUTTON
form item, where the item tag name is
"b_close
", and the button name (and the action name) is
"close
":LAYOUT
GRID
{
...
[b_close ]
}
END
END
...
ATTRIBUTES
BUTTON b_close: close, TEXT="Close";
END
Action views in stack-based layout
In a stack-based
container, action views are defined as stack items, with the attribute defining the rendering
and
behavior:
LAYOUT
STACK
GROUP group1 ( TEXT="Customer" )
...
BUTTON print, TEXT="Print Report", IMAGE="printer";
...