DIALOG FILES

From Recital Documentation Wiki
Revision as of 15:56, 10 November 2009 by Helengeorge (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Purpose

Display a menu of filenames in a dialog


Syntax

DIALOG FILES LIKE <skeleton>

[LABEL <expC>]

[TRIM]


See Also

ADIR(), DIALOG MESSAGE, DIALOG FIELDS, DIALOG GET, DIALOG QUERY, DIALOG SCOPE, DIR, Function Keys, MENU FILES, MENUITEM(), SET COLOR, SET COLOR OF, SET DIALOG


Description

The DIALOG FILES command displays a menu listing the files matching the pattern <skeleton>. The menu is centered on the screen and the screen is automatically saved and restored. The following 'wild card' characters may be used


Character Description
? Matches any one character.
% Matches any one character.
* Matches zero or more characters.


The default title of "Files" can be replaced with the specified <expC>, using the LABEL clause. If the optional TRIM clause is used, the filenames are displayed without file extensions. The SET COLOR and SET COLOR OF DIALOGFRAME commands may be used to specify the colors for the dialog box and frame.

The cursor and [PAGE UP], [PAGE DOWN] keys are used to navigate the menu, the [RETURN] key to select a filename. Once a filename is selected, the 'OK' and 'Cancel' buttons or the [EXIT SAVE] and [ABANDON] keys can be used to exit the dialog with or without saving.

On exit from DIALOG FILES, the MENUITEM() function can be used to return the selected filename as a character string. If the user pressed the 'Cancel' button or the [ABANDON] key, MENUITEM() will return a null string.


Example

dialog files like *.frm trim label "Reports"
if not empty(menuitem())
    store menuitem() to rpt
    report form &rpt to print
else
    dialog box "No Report chosen"
endif


Products

Recital