Previous Next

Enumeration member access

(Windows only; GUI for .NET only)
References a .NET enumeration member in order to read its value.
Syntax 
 
type-name : enum-member 
type-name
The type name of a .NET enumeration 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 .NET enumeration name.
enum-member
Specifies a name that identifies a specific member of the enumeration. In ABL, an enumeration member is an object that represents a constant value with a specific underlying data type defined for the enumeration. All members of an enumeration share the same underlying data type. Wherever you reference an enumeration member, ABL references the member object, not the defined constant value that the specified member represents. However, because a .NET enumeration is a value type, when you pass the enumeration member to a .NET method parameter or assign it to or from a .NET property or data member, ABL automatically converts between the .NET value and the ABL object that represents it.
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 enumeration member:
 
button1:BackColor = System.Drawing.KnownColor:Aqua.
Notes 
*
*
See also 
Progress.Util.EnumHelper class

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.