Topic: APLX Help : System Classes : List of Classes : ChooseDir
[ Previous | Next | Contents | Index | APL Home ]

www.microapl.co.uk

ChooseDir


Description

The ChooseDir class implements the pre-defined directory-selection dialog. This is a top-level object (i.e. it should not be opened as the child of a window).

To use the dialog, you must first create it using ⎕NEW. (Alternatively, you can create it as a top-level object using the New or Create method of ⎕WI). It will remain hidden at this stage. You can optionally set the initial directory as the directory property. You can also set the title of the dialog as the caption property.

When you are ready to show the dialog, call the Show method. This displays the modal dialog. The user can then select a directory; if the Cancel button is pressed, the Show method returns 0. If the OK button is pressed, the Show method returns 1. You can then read the directory property to retrieve the directory selected by the user.

Example

     ∇DEMO_ChooseDir;DLG
[1]   ⍝ Sample function demonstrating use of the ChooseDir object
[2]   DLG←'⎕' ⎕NEW 'ChooseDir'
[3]   ⍝ Show the dialog. If user presses Cancel, quit
[4]   :If 1=DLG.Show
[5]     ⍝ He pressed OK.
[6]     'Directory selected: ',DLG.directory
[7]   :EndIf
     ∇

Properties

caption children class data directory events methods name opened properties self tie

Methods

Close Create Delete New Open Send Set Show Trigger

Callbacks

onClose onDestroy onOpen onSend


Topic: APLX Help : System Classes : List of Classes : ChooseDir
[ Previous | Next | Contents | Index | APL Home ]