guiSpinnerSetValue (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

NX-400

Firmware version:

1.00.00


This function sets the value of a numeric spinner.

Calling this function does not trigger the spinner changed event.

 

Input:

spinner : SYSHANDLE

A handle to the numeric spinner to change the value for.

 

value : DINT

The new value to set the spinner to.

 

Returns: INT

0

- Success.

-1

- Interface is not open (see guiOpen).

-3

- Invalid handle or the value is outside the range.

-11

- The GUI API is not supported.

 

Declaration:

FUNCTION guiSpinnerSetValue : INT;
VAR_INPUT
  spinner : SYSHANDLE;
  value   : DINT;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  rc     : INT;
  spinner : SYSHANDLE;
END_VAR;
 
BEGIN
  ...
  // Set the value to 5
  rc := guiSpinnerSetValue(spinner := spinner, value:=5);
  ...
END;
END_PROGRAM;