Try OpenEdge Now
skip to main content
ABL Reference
ABL Syntax Reference : Enumeration member access
 

Enumeration member access

References an ABL or .NET enumeration member in order to read its value.

Syntax

enum-type-name : enumeration-member
enum-type-name
The type name of an ABL or .NET enumeration type whose member you want to access. Specify an enumeration type name using the syntax as described in the Type-name syntax reference entry. With an appropriate USING statement, you can specify an unqualified enumeration type name.
enumeration-member
Specifies a name that identifies a specific enumeration member defined in the ABL or .NET enumeration type.

Example

To set the background color of a button (button1) to the known system color, aqua, you might enter this ABL code to set the BackColor button property to the value of the appropriate System.Drawing.KnownColor member:
button1:BackColor = System.Drawing.KnownColor:Aqua.
Similarly, you can set a variable defined as a Progress.Reflect.Flags enumeration to the Public member for use with one of ABL's reflection methods:
DEFINE myAccessLevel AS Progress.Reflect.Flags.

myAccessLevel = Progress.Reflect.Flags:Public.

Notes

*A .NET enumeration type can be an inner member of a class or its own type. For more information on referencing enumeration types, see the Type-name syntax reference entry.
*For a list of ABL constructs and operators that can be used directly with ABL enumeration types, see the ENUM statement entry.

See also

ENUM statement, Progress.Util.EnumHelper class