guiRadioButtonIsSelected (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

NX-400

Firmware version:

1.00.00


This function returns the current selected state of the radio button.

 

Input:

radio_button : SYSHANDLE

A handle to the radio button to get the state of.

 

Returns: INT

1

- Radio button is selected.

0

- Radio button is not selected.

-1

- Interface is not open (see guiOpen).

-3

- Invalid handle.

-11

- The GUI API is not supported.

 

Declaration:

FUNCTION guiRadioButtonIsSelected : INT;
VAR_INPUT
  radio_button : SYSHANDLE;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  radio1 : SYSHANDLE;
  radio2 : SYSHANDLE;
END_VAR;
 
BEGIN
  ...
  // Check if radio1 is selected
  IF guiRadioButtonIsSelected(radio_button := radio1) = 1 THEN
    DebugMsg(message := "Radio 1 selected");
  END_IF;
  // Check if radio2 is selected
  IF guiRadioButtonIsSelected(radio_button := radio2) = 1 THEN
    DebugMsg(message := "Radio 2 selected");
  END_IF;
  ...
END;
END_PROGRAM;