Most of the built-in functions can be used with textual regions as well as with other types of objects. The functions return different values for textual regions than they do for other objects, since the values are based on lines and columns rather than X Y coordinates. See Using Response Inquiry Built-in Functions and Using Built-in Functions with Graphical Objects for more information on built-in functions.
In addition to the built-in functions that can be used with all objects, there are several that are unique to textual regions. Each is described in the following sections.
Function |
Value Returned for Textual Regions |
|||||
top [of] |
Line number of the first line (always 1) of the textual region. |
|||||
bottom [of] |
Line number of the last line of text in the textual region. |
|||||
left [of] |
Column number of the leftmost column (always 1) of the textual region. |
|||||
right [of] |
Column number of the rightmost character in the longest line of the textual region. |
|||||
xmiddle [of] |
The value of right [of], divided by 2. |
|||||
ymiddle [of] |
The value of bottom [of], divided by 2. |
|||||
xcoord |
Column number of the character selected. |
|||||
ycoord |
Line number of the character selected. |
|||||
xcursor [of] |
Column number of the position of the text cursor. |
|||||
ycursor [of] |
Line number of the position of the text cursor. |
|||||
xposition |
X coordinate of the lower left corner of the viewport, in parent's coordinates. |
|||||
yposition |
Y coordinate of the lower left corner of the viewport, in parent's coordinates. |
|||||
xsize [of] |
The X dimension of the textual region's size, in its parent's coordinate system. For textual regions defined by window size, this is the number of columns plus 1, multiplied by the column size, in the textual region's coordinates. |
|||||
ysize [of] |
The Y dimension of the textual region's size, in its parent's coordinate system. For textual regions defined by window size, this is the number of lines plus 1, multiplied by the line size, in the textual region's coordinates. |
|||||
ancestry [of] |
String associated with the textual region's ancestry. |
|||||
background at |
Integer that is the background color of the specified line and column of text. |
|||||
background of |
Integer associated with the background color of the textual region. (Note that this is different from the background at function. |
|||||
border of |
Integer associated with the color of the textual region's border. |
|||||
exists |
Boolean associated with the textual region's name. |
|||||
foreground at |
Integer that is the foreground color of the specified line and column of text. |
|||||
foreground of |
Integer associated with the foreground color of the textual region. (Note that this is different from the foreground at function.) |
|||||
handle of |
Integer that is the Windows or the PM window handle for the object. |
|||||
line size of |
Height of line, in the parent's coordinates. |
|||||
parameter |
Parameter string associated with the specified textual region. (Use only within a response to OBJECT or response to item response definition.) |
|||||
parameter of |
Parameter string associated with the specified textual region. |
|||||
priority of |
Integer associated with the priority of the textual region. |
|||||
selectability of |
Boolean associated with the selectability of the textual region. |
|||||
text of |
String containing the title bar text. |
|||||
textual |
{ |
Line LINE_NO SEGMENT_DEF BLOCK_DEF |
} |
from TR_NAME |
String containing the contents of the specified line, segment or block |
|
visibility of |
Boolean associated with the visibility of the textual region. |
|||||
window xsize [of] |
Width of the window, in lines. |
|||||
window ysize [of] |
Height of the window, in columns. |
|||||
window xposition [of] |
Column number of the leftmost character in the window. |
|||||
window yposition [of] |
Line number of the topmost character in the window. |
|||||
found |
true if the result of a find statement was successful; false otherwise. |
|||||
ioerror |
true if the result of a read or write action statement or an insert file drawing statement was unsuccessful; false otherwise. |
|||||
object |
String containing the name of an object or item for which a response is taken. |
In addition to the built-in functions listed above, there are many built-in functions unique to textual regions. Some of these have already been introduced. Each function is described in detail in Using the textual Object Inquiry Built-in Functions.