Version 6.3.8 for Windows
 —  Dialog Component Reference  —

GET-TEXT Action

This document covers the following topics:


Description

Retrieves the text (if any) 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 returns the same information as a query 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 retrieved.

Note that this action can only be used to retrieve text belonging to dialog elements that are windows or controls. For example, it can be used on a dialog or pushbutton, but not to retrieve 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 significant trailing blanks in the text to be recognized and preserved.

Top of page

Parameters

Name/Data Type Explanation
Object

(HANDLE OF GUI )

Input

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

Text (A) Output

Text associated with specified dialog or dialog element.

Response (I4) Output

Natural error (if applicable).

Example:

 
DEFINE DATA LOCAL
1 #CONTROL HANDLE OF GUI
1 #TEXT (A) DYNAMIC
END-DEFINE
*
PROCESS GUI ACTION GET-TEXT WITH #CONTROL
  #TEXT GIVING *ERROR
WRITE #TEXT (AL=72) *LENGTH(#TEXT) 

Top of page