Action Statement
Add an item to an action bar or pulldown at runtime.
add item ITEM_NAME1 to
{action bar|pulldown PD_NAME [from AB_NAME]}
in {REG_NAME|REG_CLS_NAME}
[{before|after} item ITEM_NAME2 [from AB_NAME] ]
ITEM_NAME1
The identifier for a pulldown or button to be added to an action bar; it is also the identifier for a choice or separator to be added to a pulldown.
PD_NAME
The identifier for a pulldown.
AB_NAME
The identifier for an action bar template. The action bar name must be specified if more than one template contains an item of the given name. It cannot be specified if the item was defined outside of an action bar template.
REG_NAME
The identifier for a region.
REG_CLS_NAME
The identifier for a class of regions.
ITEM_NAME2
The identifier for an item in an action bar or pulldown.
Description
When adding to an action bar, if you do not specify the before/after clause, the item will be added at the end of the action bar. If you have buttons in an action bar, add pulldowns before the first button item.
When adding to a pulldown, if you do not specify the before/after clause, the item will be added to the end of the pulldown.
You cannot use from AB_NAME if the pulldown was added dynamically.
Item definitions added at runtime must be added to classes in order for you to write responses for them.
Example
string Del_Char_SV
integer lineNo_IV
action bar Phone_List_AB is
pulldown File_Choices_PD text "~File"
choice Open_MC text "~Open..."
choice Save_As_MC text "~Save As"
end pulldown
end action bar
choice Delete text "~Delete"
response to Phone_LB
copy selected line from Phone_LB to lineNo_IV
extract from textual line lineNo_IV from Phone_LB
take 1 Del_Char
if (Del_Char = "*") then
add item Delete to pulldown File_Choices_PD from
Phone_List_AB in Phone_Region
end if
See Also
action bar Attribute Definition
pulldown Definition