Creates a scrolling window for viewing text from a file or character string.
NOTE: Either the File or the Text keyword must be supplied to identify the text that WgTextTool will display.
File The name of the file to display. The File and Text keywords are mutually exclusive, and one of them must be used.
Position A two-element vector specifying the x- and y-coordinates of the upper-left corner of the TextTool window (long integer). The elements of the vector are [x, y], where x (horizontal) and y (vertical) are specified in pixels. These coordinates are measured from the upper-left corner of the screen.
Rows The number of text rows to display when the window is first created.
Text A string containing the text that will be displayed. The Text and File keywords are mutually exclusive, and one of them must be used.
Title A string containing the title that appears in the header of the TextTool window. If not specified, either the name of the file is used for the title, or when TextTool is displaying a string, the value of the title defaults to "Scrolling Window".
Background Specifies the background color name.
Figure 2-171 WgTextTool displays either: 1) text from a file, or 2) text from an input string. In this illustration, WgTextTool is displaying text from the copyright file that is distributed with every copy of PV-WAVE.
Figure 2-172 WgTextTool displays either: 1) text from a file, or 2) text from an input string. In this illustration, WgTextTool is displaying text from the copyright file that is distributed with every copy of PV-WAVE.
NOTE: The text displayed in the window is read only; it cannot be edited.
Copy
function will be sensitized, because the text is read-only.
parent
is defined, WgTextTool is created as a child of parent
; otherwise, WgTextTool runs on its own (i.e., in its own event loop).When you are finished interacting with the WgTextTool window, close it by clicking the
Dismiss
button.
PRO Sample_wgtexttool, parent, tool_shell IF !Version.platform EQ 'VMS' THEN BEGIN filename = GETENV('WAVE_DIR')+'copyright'
ENDIF ELSE BEGIN filename = '$WAVE_DIR/copyright'
ENDELSE IF N_ELEMENTS(parent) NE 0 THEN BEGIN WgTextTool, File=filename, parent, tool_shell
ENDIF ELSE BEGIN WgTextTool, File=filename
ENDELSE END
For more information about how to write an application program based on WAVE Widgets, refer to Chapter 5, Using WAVE Widgets, in the PV-WAVE GUI Application Developer's Guide. For more information about how to write an application program based on the PV-WAVE Widget Toolbox, refer to Chapter 6, Using the Widget Toolbox, in the PV-WAVE GUI Application Developer's Guide.