SET-TEXT Action

This document covers the following topics:


Description

Sets the text to be associated with the specified dialog or dialog element. For example, the contents of an edit area or the caption of a window or button.

This action sets the same information as a update of the dialog or dialog element's STRING attribute, if available. However, unlike the use of the attribute, this action allows text in excess of 253 characters to be set.

Note that this action can only be used to set text belonging to dialog elements that are windows or controls. For example, it can be used on a dialog or pushbutton, but not to set the text of a list box item, even though the latter has a STRING attribute.

The receiving field may be a dynamic variable, allowing any trailing blanks in the text to be preserved.

Parameters

Name/Data Type Explanation
Object

(HANDLE OF GUI )

Input

Handle of dialog or dialog element whose text is to be set.

Text (A) Input

Text to be associated with specified dialog or dialog element.

Response (I4) Output

Natural error (if applicable).

Example:

 
DEFINE DATA LOCAL
1 #CONTROL HANDLE OF GUI
END-DEFINE
*
PROCESS GUI ACTION SET-TEXT WITH #CONTROL
  'Caption' GIVING *ERROR