$INCLUDE "rapidq.inc"
$INCLUDE "QDirListView.inc"
$RESOURCE ICO_JPEG_SMALL AS "jpeg_small.ico"
$RESOURCE ICO_JPEG_LARGE AS "jpeg_large.ico"
$RESOURCE ICO_GIF_SMALL AS "gif_small.ico"
$RESOURCE ICO_GIF_LARGE AS "gif_large.ico"
$RESOURCE ICO_BMP_SMALL AS "bmp_small.ico"
$RESOURCE ICO_BMP_LARGE AS "bmp_large.ico"
DECLARE SUB DirListChange
DECLARE SUB DirListFileSelect(Tag AS INTEGER)
CREATE Form AS QFORM
Width = 500
Height = 300
Center
CREATE DirList AS QDirListView
Align = alClient
ShowRoot = True
ViewStyle = vsList
OnChange = DirListChange
OnFileSelect = DirListFileSelect
ExtensionsList.AddItems ("jpg", "jpe", "jpeg", "gif", "bmp")
SmallImageList.AddIcoHandle(ICO_JPEG_SMALL)
LargeImageList.AddIcoHandle(ICO_JPEG_LARGE)
SmallImageList.AddIcoHandle(ICO_JPEG_SMALL)
LargeImageList.AddIcoHandle(ICO_JPEG_LARGE)
SmallImageList.AddIcoHandle(ICO_JPEG_SMALL)
LargeImageList.AddIcoHandle(ICO_JPEG_LARGE)
SmallImageList.AddIcoHandle(ICO_GIF_SMALL)
LargeImageList.AddIcoHandle(ICO_GIF_LARGE)
SmallImageList.AddIcoHandle(ICO_BMP_SMALL)
LargeImageList.AddIcoHandle(ICO_BMP_LARGE)
END CREATE
END CREATE
Form.SHOWMODAL
SUB DirListChange
DirList.InheritOnChange
Form.CAPTION = DirList.Directory
END SUB
SUB DirListFileSelect(Tag AS INTEGER)
SHOWMESSAGE("File '" + DirList.FileName + "' was selected.")
END SUB
|