User Tools

Site Tools

Navigation:  Templates > Guide to all Templates > Control Templates >====== ASCII View control template ====== Previous pageReturn to chapter overviewNext page

The AsciiViewControl template adds a LIST control in which you can display read-only, the contents of a file–including variable length files. It is typically used to display an ASCII text file. The AsciiViewControl template optionally provides search and print capability for the displayed file.

The template lets you select the file to view at design time, or leaves the selection to the end user at runtime if you prefer. Finally, the template optionally allows the LIST control to alternate its display between the selected file and some other data that you specify.

The AsciiViewControl template provides embed points for its LIST control. It also provides the following prompts on the List Properties dialog Actions tab, the Procedure Properties dialog, or the Extension and Control Templates dialog:

General Options

Initialize Viewer

Determines when the procedure initializes the Viewer object. Initialization includes selecting the file to view, opening it, and reading it.

On Open Window

Initializes the Viewer when the window opens so that the Viewer's LIST is full upon initial display.

On Field Selection

Delays initializing the Viewer until the end user selects the Viewer's LIST control.


Does not initialize the Viewer. You must embed a call to the Viewer#:Initialize ROUTINE to initialize the Viewer.

File to Browse

Specifies the path and name of the file to view, or a variable containing the path and name of the file to view. The variable must be preceded by an exclamation point (!).

If no path is specified, the procedure looks for the file in the current directory.

If omitted (left blank), the Viewer object prompts the end user to select a file.

Reassign FROM attribute after Kill

Check this box to reset the Viewer LIST's FROM attribute after the Viewer shuts down. See FROM in the Language Reference. This lets you use a single LIST control to display both the File to Browse and other items as well.

Value or queue to assign

Type the label of the QUEUE (or the string constant) to assign to the Viewer LIST's FROM attribute.

Allow popup menu searching

Check this box to provide a (RIGHT-CLICK) popup menu choice to search the file.

Allow popup menu printing

Check this box to provide a (RIGHT-CLICK) popup menu choice to print some or all of the records in the file.

Classes Tab

Use the Classes tab to override the global settings for the Class. See Classes Tab.

See Also:

ASCII Print Button TPLControlASCIIPrintButton

ASCII Search Button TPLControlASCIISearchButton

ASCII View in List box extension

asciiviewcontrol.htm.txt · Last modified: 2021/04/15 15:56 by