The dirselect type

Purpose

This is an object which allows you to select a directory in a directory select window. However, as there is no special method to have a window type of object, it is implemented as a keypress object. If the associated key is pressed, the window is activated, but you can also explicitly active the window. (Note that if you don't attach a keypress to the dirselect object (which is done with the PW('KEYPRESS') tag), the window can't be activated with a keypress).

A directory select window consists of an edline where the directory can be edited directly, a list of devices and a menu which contains both the subdirectories to the current directory, and possibly some directories which have been configured because they are often used.

The devices which are displayed are the devices which have been configured as being the accessible (or most used) devices on your system (using DIRSELECT-DEVICE). The often used directories can be configured using DIRSELECT-DIRECTORY).

The directory which should be used as default in the dirselect window can be set explicitly (it defaults to "", which is converted to the data default (as set with DATA_USE) when the window is activated). The title of the window can also be set.

The Type Word

When creating this type of object, the type parameter is:

PW('TYPE_DIRSELECT')

The tags

Here are the tags for this object. As usual, change tags are also used when creating the object.
The change (and creation) tags
PW('DIRSELECT_SET')
Set the current directory for the directory select object. The parameter is a string. By default the directory is "". If the directory is "", the data default will be used as directory.
PW('DIRSELECT_TITLE_TEXT')
Set the text which has to appear in the title bar of the directory select window. The parameter is a string. By default the title is "dir select".
PW('DIRSELECT_ACTIVATE')
Activate the directory select window: the window is drawn and lets the user select a directory. This tag has no parameters. The directory select object is a keypress object. A keypress can be given to it and the window is displayed when that key is pressed. However, the window can also explicitely be asked for by passing this tag to the object.
PW('DIRSELECT_ACTION')
Set a function which should be called when the directory select window is closed. This doesn't make much sense in SBasic.
PW('DIRSELECT_GET')
Get the current directory from the directory select object. Two parameters are needed, the maximum length of the fixstring and the fixstring itself. If the text in the object is larger than the maximum length, the string will be filled as much as possible. Use MKLEN to make the string into a true SBasic string.
the query tags There are no query tags for this object.
PROGS, Professional & Graphical Software
last edited 1996 Jun 06 (wl)