Please enable JavaScript to view this site.

ESL Documentation

Items can be grouped together into item classes. Although item classes are similar to object classes, the two should not be confused. Object classes contain regular ESL objects. Object classes are used in place of objects or regions, to apply an action to more than one region at a time. Some of the actions and responses in this chapter can be used with object classes. change action bar, for example, when applied to an object class, changes the action bar of all of the regions in that class.

 

Item classes, however, contain a collection of pull-down, button, choice, and separator definition references. Item classes are used in place of items, to apply an action to more than one item at a time. Items from the same action bar or different action bars can be grouped into a class. Item definitions added at runtime must be added to classes in order to write responses for them.

 

Only the reference to the template can be added to classes; items from specific regions cannot.

 

You can write responses for item classes as well as items. You can also apply the functions that manipulate items (check item and uncheck item in Checking and Unchecking Items, enable item and disable item in Enabling and Disabling Items, and change item text in Changing the Text of an Item) to entire item classes.

 

You might want to disable a large group of items all at once. For example, your action bar might contain a number of pull-down choices that the user cannot select until the OpenFile choice is selected. This is a good example of a use for item classes. If all of these items are placed in an item class together, then they can be enabled and disabled as a group.