The Output Box widget displays streaming text data. The data may come from a specified
Output Channel, or be explicitly added. By default, it does not listen to
Table 1. Summary
Logical Widget Name:
See Widget Operations
Supported in Grid?
Yes, for testing purposes only.
For more information, see Accessibility.
The output box widget is useful for displaying
messages and process output. It can automatically stream information from the Compiler Output
channel, Putmess channel, or Message Line channel, as determined by the Output
It is also possible to manually add text messages
to the output box. To do so, you can do one of the following:
Assign a string to the field value (and then
use the show command to synchronize the display)
Use the widget operation
addLine(), which has the advantage of being immediately (synchronously)
The Uniface line break symbol %%^
is interpreted. For example:
"This is a veryyyyyyy long line%%^And this comes at the next line"
is displayed as:
This is a veryyyyyyy long line
And this comes at the next line
As text is streamed in, the output box scrolls to
display the last line, adding horizontal and vertical scrollbars as necessary. The widget has no
awareness of the current line—there is only one active line and that is always the last line. The
last line is available in the field value and can be read from Proc.
The complete content can be read using widget
The output box widget supports Unicode and the
standard Uniface field colors. How the color is handled depends on the underlying window
Printing is not supported, but you can use the
getContent widget operation to copy the content to a variable, which you can
then send to a log file or other output.
To clear the widget, clear it's parent entity.
The Output Box widget has widget operations that
can be called in Proc to manipulate the contents of the widget, without changing the field's value.
To call these operations, use the $widgetoperation with a field handle (obtained
by $fieldhandle). For more information, see $widgetoperation.
The Output Box has the following widget
addLine—add a string to
the Output Box.
current content of the Output Box into a variable (Output). The output consists
of a Uniface list in which each item is a line in the Output Box.
Keys and Macros
The output box widget uses standard keyboard keys
for navigation through the data
Table 3. Navigation Keys
Up and Down arrows
Scroll data one line at a time
Scroll data one page at a time. (A page is
equal to the size of the control.)
Move to top of data
Move to end of data
Table 4. Macros
Puts the complete content on the
Allows the user to save the data in a
Example: Connecting the Output Box to the Putmess Channel
The following code redirects the
putmess output to the output box. Whenever code calls the
putmess statement, this text is also sent to the Output Box. No additional code
Example: Procedurally Adding Messages to the Output Box
The following example adds a message to the Output
Box using the addLine widget operation:
vHandle = $fieldhandle("OUTPUTBOX_FIELD")
if (FLD1.MYENT > FLD2.MYENT)
vHandle->$widgetoperation("addLine", "Error: FLD1 is bigger than FLD2")