Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

DspButtonFn

  • Last UpdatedJul 18, 2023
  • 2 minute read

Displays a button at a specified AN. When the button is selected, a user function is called. If the width and height are 0 (zero), then the button adjusts to the size of the button sName.

Note: This function was designed to only be used on Cicode objects, or the animation point object from the version 3.xx/4.xx toolbox.

Syntax

DspButtonFn(nAN, UpFunction, Name [, hFont] [, Width] [, Height] [, DownFunction] [, RepeatFunction] )

nAN:

The animation-point number.

UpFunction:

The user function called 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. This callback function can have no arguments, so specify the function with no parentheses (). The callback function needs to return INT as its return data type. You cannot specify a Plant SCADA built-in function for this argument.

Name:

The name to display on the button.

hFont:

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.

Width:

The width of the button in pixels.

Height:

The height of the buton in pixels.

DownFunction:

The user function called when the mouse button is clicked down (over the command button). Normally this parameter is not used, because most buttons are configured to activate when the mouse button is released (returning to the `up' position). The callback function needs to have no arguments, so specify the function with no parentheses (). The callback function needs to return INT as its return data type. You cannot specify a Plant SCADA built-in function for this argument.

RepeatFunction:

The user function called repetitively, while the mouse button is being held down (over the command button) The callback function needs to have no arguments, so specify the function with no parentheses (). The callback function needs to return INT as its return data type. You cannot specify a Plant SCADA built-in function for this argument.

Return Value

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

DspButton, DspFont, DspFontHnd

Example

DspButtonFn(20,MyFunc,"Help",0,50,10);

! Call this function when the button is selected.

INT

FUNCTION

MyFunc()

PageDisplay("Help");

RETURN 0;

END

See Also

Display Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in