Difference between revisions of "DIALOG FILES"

From Recital Documentation Wiki
Jump to: navigation, search
Line 1: Line 1:
=DIALOG FILES=
 
 
 
 
==Class==
 
==Class==
 
Screen Dialogs
 
Screen Dialogs
Line 19: Line 16:
  
 
==See Also==
 
==See Also==
[[ADIR()]], [[DIALOG MESSAGE]], [[DIALOG FIELDS]], [[DIALOG GET]], [[DIALOG QUERY]], [[DIALOG SCOPE]], [[DIR]], [[MENU FILES]], [[MENUITEM()]], [[SET COLOR]], [[SET COLOR OF]]
+
[[ADIR()]], [[DIALOG MESSAGE]], [[DIALOG FIELDS]], [[DIALOG GET]], [[DIALOG QUERY]], [[DIALOG SCOPE]], [[DIR]], [[Function Keys]], [[MENU FILES]], [[MENUITEM()]], [[SET COLOR]], [[SET COLOR OF]], [[SET DIALOG]]
  
  
Line 49: Line 46:
 
dialog files like *.frm trim label "Reports"
 
dialog files like *.frm trim label "Reports"
 
if not empty(menuitem())
 
if not empty(menuitem())
  store menuitem() to rpt
+
    store menuitem() to rpt
  report form &rpt to print
+
    report form &rpt to print
 
else
 
else
  dialog box "No Report chosen"
+
    dialog box "No Report chosen"
 
endif
 
endif
 
</code>
 
</code>

Revision as of 11:47, 28 April 2009

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