Difference between revisions of "DIALOG FILES"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 19: Line 19:
  
 
==See Also==
 
==See Also==
[[ADIR()]], [[DIALOG MESSAGE]], [[DIALOG FIELDS]], [[DIALOG GET]], [[DIALOG QUERY]], [[DIALOG SCOPE]], [[DIR]], [[MENU FILES]], [[MENUITEM()]], [[SET COLOR]]
+
[[ADIR()]], [[DIALOG MESSAGE]], [[DIALOG FIELDS]], [[DIALOG GET]], [[DIALOG QUERY]], [[DIALOG SCOPE]], [[DIR]], [[MENU FILES]], [[MENUITEM()]], [[SET COLOR]], [[SET COLOR OF]]
  
  

Revision as of 17:04, 17 March 2009

DIALOG FILES

Class

Screen Dialogs


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, MENU FILES, MENUITEM(), SET COLOR, SET COLOR OF


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 Terminal Developer