Difference between revisions of "GETDIR()"

From Lianjapedia
Jump to: navigation, search
(Description)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
Function to display an Open dialog allowing a filename to be selected and returned.
+
Function to display a dialog allowing a directory to be selected and its name returned.
  
 
==Syntax==
 
==Syntax==
GETDIR([<expC1>] [,<expC2>] [,<expC3>] [,<expN1>])
+
GETDIR([<expC1> [, <expC2> [, <expC3> [, <expN> [, <expL>]]]]])
  
 
==See Also==
 
==See Also==
Line 9: Line 9:
  
 
==Description==
 
==Description==
The GETDIR() function displays an Open dialog allowing a filename to be selected and returned.  The dialog allows navigation through directories and shows a list of relevant files in that directory.  The cursor keys, Return key and tab key can be used to navigate the different sections under a character mode environment.  If the user selects a file, the GETDIR() function returns the name of that file.  If no file is selected, the GETDIR() function returns an empty string "".
+
The GETDIR() function displays a dialog allowing a directory to be selected and its name returned.  The dialog allows navigation through directories and sub-directories.  If a directory is selected, the GETDIR() function returns the name of that directory.  If no directory is selected, the GETDIR() function returns an empty string "".
  
{| class="wikitable" width=100%
+
{| class="wikitable" width="100%"
!width=30%|Parameters||width=20%|Required||Description
+
!width="30%"|Parameters||width=70%|Description
 
|-
 
|-
|valign="top"|<expC1>||valign="top"|No||A file extension skeleton.  If specified only files with this extension are shown
+
|valign="top"|<expC1>||valign="top"|The starting directory
 
|-
 
|-
|valign="top"|<expC2>||valign="top"|No||The text to display at the top of the dialog.  If not specified, 'Open' is displayed.
+
|valign="top"|<expC2>||valign="top"|Ignored.
 
|-
 
|-
|valign="top"|<expC3>||valign="top"|No||The text to display on the Ok button.  This is ignored, the button is always labeled 'Ok'.
+
|valign="top"|<expC3>||valign="top"|The text to display in the dialog title bar.
 
|-
 
|-
|valign="top"|<expN1>||valign="top|No||The buttons set to be displayed.  This is ignored, the buttons are always Ok, Cancel, Reset, Back and Help.
+
|valign="top"|<expN>||valign="top|Ignored.
 +
|-
 +
|valign="top"|<expL>||valign="top|Ignored.
 
|-
 
|-
 
|}
 
|}
Line 26: Line 28:
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
cProgramSelected = getdir("prg","Please select a program")
+
cDirSelected = getdir("C:\Lianja","","Please select a directory")
 
</code>
 
</code>
  

Latest revision as of 10:37, 14 February 2020

Purpose

Function to display a dialog allowing a directory to be selected and its name returned.

Syntax

GETDIR([<expC1> [, <expC2> [, <expC3> [, <expN> [, <expL>]]]]])

See Also

DIRECTORY(), GETFILE(), LOCFILE(), PUTFILE()

Description

The GETDIR() function displays a dialog allowing a directory to be selected and its name returned. The dialog allows navigation through directories and sub-directories. If a directory is selected, the GETDIR() function returns the name of that directory. If no directory is selected, the GETDIR() function returns an empty string "".

Parameters Description
<expC1> The starting directory
<expC2> Ignored.
<expC3> The text to display in the dialog title bar.
<expN> Ignored.
<expL> Ignored.

Example

cDirSelected = getdir("C:\Lianja","","Please select a directory")