guiControlSetText (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

NX-400

Firmware version:

1.00.00


This function sets the text for the provided control.

This is currently available for the label, button and text box controls.

 

Input:

control : SYSHANDLE

A handle to the control to set the text for.

 

text : STRING

The text to set.

 

Returns: INT

0

- Success.

-1

- Interface is not open (see guiOpen).

-3

- The form is not valid or the form is visible.

-8

- The text contains invalid characters.

-11

- The GUI API is not supported.

 

Declaration:

FUNCTION guiControlSetText : INT;
VAR_INPUT
  control : SYSHANDLE;
  text   : STRING;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  rc     : INT;
  label : SYSHANDLE;
END_VAR;
 
BEGIN
  ...
  // Set the text of the previous created label to "New Text"
  rc := guiControlSetText(control := label, text := "New Text");
  ...
END;
END_PROGRAM;