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


Displays a button at a specified AN. When the button is selected, the key definition is put into the key command line. The font, width, height, and down and repeat keys of the button are optional. If you do not specify a width and height, the button adjusts to the size of the button Name.

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


DspButton(AN, UpKey, Name [, hFont] [, Width] [, Height] [, DownKey] [, RepeatKey] [, Style])


The animation-point number.


The key generated when the command button is selected (when the mouse button is released after being clicked down). This is the default operation for commands activated by a button.


The name to display on the button.


The handle of the font used to display the button name. Use the DspFont() function to create a new font and return the font handle. Use the DspFontHnd() function to return the font handle of an existing font. The Windows button font is used if the font is omitted or is not defined in the database.


The width of the button in pixels.


The height of the button in pixels.


The key generated when the mouse button is clicked down (over the command button). Normally this parameter is not used, because most buttons are configured to activate a command when the mouse button is released (returning to the `up' position).


The key generated repetitively, while the mouse button is being held down (over the command button).


A number indicating the visibility style of the button:

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

DspButtonFn, KeySetSeq, DspFont, DspFontHnd


/* Display a self-sizing button at AN20 using the default font. 
The button is named "Help". When selected, the Key Code "KEY_F1" 
is put into the key command line. */
/* Display the same button at AN20, but in an existing font called "BigFont". */

See Also

Display Functions