Adding an Enumeration to the Type Library

From RAD Studio
Jump to: navigation, search

Go Up to Using the Type Library Editor

To add enumerations to a type library

  1. On the toolbar, click the enum icon. An enum type is added to the Object List pane.
  2. Type a name for the enumeration. The new enum is empty and contains default attributes in its attributes page for you to modify.

Add values to the enum by right-clicking the enum and selecting the New > Const button. Then, select each enumerated value and assign it a name (and possibly a value) using the attributes page.

Once you have added an enumeration, the new type is available for use by the type library or any other type library that references it from its uses page. For example, you can use the enumeration as the type for a property or parameter.

See Also