Please enable JavaScript to view this site.

ESL Documentation

Item Inquiry Built-in Function

Return whether an item is enabled (selectable).

(item ITEM_NAME [from AB_NAME] in REGION_NAME is enabled)

ITEM_NAME

Identifier for an item.

AB_NAME

The identifier for an action bar template. You must specify the action bar name if more than one template contains an item of the given name. You cannot specify the action bar name if the item was defined outside of an action bar template. In ESL for Windows, only those regions that are children of the desktop can have action bars.

REGION_NAME

The identifier for a region containing the item.

Description

Use this function to determine whether an item is currently enabled. You must enclose the entire statement in parentheses.

The value returned is the boolean associated with the enabled state of the specified object. If the item is enabled, the value true is returned; if it is disabled, the value false is returned.

Example

 

response to item Exit from FileActionBar

 if (item Open from FileActionBar in MainRegion is

         enabled) then

         send "user has closed file\n" to errorlog

         exit

 end if

See Also

enable and disable Action Statements