Cicode Programming Reference > Cicode Function Categories > Display Functions Introduction > DspGrayButton


Grays and disables a button. If the button is a symbol, the symbol is overwritten with a gray mask. (When a button is grayed, it cannot be selected.) If the Disabled field in the Buttons database is blank, the button is enabled unless you use this function. If the Disabled field in the Buttons database contains an expression, this function will not override the expression.

Note: This function is only used for V3.xx and V4.xx animations, and was superseded in later releases.


DspGrayButton(AN, nMode)


The AN where the button is located.


The mode of the operation:

0 - Ungray the button.

1 - (GRAY_SUNK) Recess the text or symbol (the text or symbol on the button is recessed and shadowed).

2 - (GRAY_PART) This mode is now obsolete - it now has the same effect as GRAY_ALL.

3 - (GRAY_ALL) - Mask the entire button (a gray mask displays over the face of the button).

Return Value

0 (zero) if successful, otherwise, -1 (if no AN is found).

Related Functions

DspButton, DspButtonFn, DspIsButtonGray


! Disable button at AN21
DspGrayButton(21, GRAY_SUNK);

See Also

Display Functions