EnumHelper:Complement ( INPUT enum AS CLASS System.Enum )
|
enum-type:enum-member
|
System.Windows.Forms.AnchorStyles:Bottom
|
USING System.Windows.Forms.* FROM ASSEMBLY.
USING Progress.Util.* FROM ASSEMBLY. DEFINE VARIABLE rMyStyle AS System.Enum NO-UNDO. /* Adds Bottom and Right to the list */ rMyStyle = EnumHelper:Or( AnchorStyles:Bottom, AnchorStyles:Right ). DISPLAY STRING( rMyStyle ) FORMAT "x(20)" SKIP. /* Displays "Bottom, Right" */ /* Sets all flags that are not set and clears all that are */ rMyStyle = EnumHelper:Complement( rMyStyle ). DISPLAY STRING( rMyStyle ) FORMAT "x(20)" SKIP. /* Displays "-11", which includes Top and Left but not Bottom or Right */ rMyStyle = EnumHelper:Complement( rMyStyle ). DISPLAY STRING( rMyStyle ) FORMAT "x(20)". /* Displays "Bottom, Right" */ |