Rapid-Q Documentation by William Yu (c)1999 Appendix A: QDIRTREE


QDIRTREE Component

QDirTree is a custom component used to provide users with a Windows Explorer like directory list. It eats up a lot of resources, so use with caution. You don't usually need more than one of these.

QDirTree Properties
Field Type R/W Default
Align INTEGER RW alNone
BorderStyle INTEGER RW bsSingle
Color INTEGER RW
Cursor INTEGER RW crDefault
Directory STRING RW False
Enabled INTEGER RW True
FastLoad INTEGER RW False
Font QFONT W
Height INTEGER RW
HideSelection INTEGER RW False
Hint STRING RW
InitialDir STRING RW
Left INTEGER RW 0
Parent QFORM/QPANEL/QTABCONTROL W
PopupMenu QPOPUPMENU W
ReadOnly INTEGER RW False
ReadOnStart INTEGER RW False
ShowHint INTEGER RW False
TabOrder INTEGER RW
Top INTEGER RW 0
Width INTEGER RW
Visible INTEGER RW True


QDirTree Methods

Method Type Description Params
AddDirTypes SUB Add directory types
'-- DirTypes
CONST dtReadOnly = 0
CONST dtHidden = 1
CONST dtSystem = 2
CONST dtNormal = 3
CONST dtAll = 4
0
AddDriveTypes SUB Add drive types
'-- DriveTypes
CONST drtUnknown = 0
CONST drtRemovable = 1
CONST drtFixed = 2
CONST drtRemote = 3
CONST drtCDRom = 4
CONST drtRamDisk = 5
0
DelDirTypes SUB Del directory types 0
DelDriveTypes SUB Del drive types 0
FullCollapse SUB Collapse entire directory list 0
FullExpand SUB Expand entire directory list (slow!) 0
Reload SUB Re-read directories 0


QDirTree Events

Event Type Occurs when... Params
OnChange VOID Current directory changes 0



QDirTree Examples

'' A Directory Tree like Windows Explorer.
'' QDIRTREE Component courtesy of Markus Stephany.
'' I took out removable drives because it doesn't work properly.
'' So you won't be able to view your floppy disk drives.  CD-ROM drives
'' are fine, as far as I know...

$TYPECHECK ON

DECLARE SUB ChangeDirectory

CREATE Form AS QForm
  Caption = "Directory Tree"
  Center
  CREATE DirTree AS QDirTree
    InitialDir = CURDIR$
    Width = Form.ClientWidth
    Height = Form.ClientHeight
    OnChange = ChangeDirectory
  END CREATE
  ShowModal
END CREATE

SUB ChangeDirectory
  ShowMessage DirTree.Directory
END SUB

Prev Component Contents Next Component

D>