QD_SetDroppableFileExtensions
QD_SetDroppableFileExtensions(areaRef; areaRef):error | |||
---|---|---|---|
![]() |
areaRef | Longint | Area reference |
![]() |
fileExtensions | Array text | Droppable file name extensions |
![]() |
error | Longint | Error result |
Configure a QDrop area to accept specific file extensions
Parameter areaRef is the reference to the plug-in area.
Parameter fileExtensions is a text array that specifies file extensions that the area will accept. File extensions should be specified without the period (.) separator.
In addition to standard file extensions such as "txt" and "jpg", a set of magic file types that provide extra matching criteria can also be used.
qd_anyFileMagic | "any*" | Accept any file |
qd_folderMagic | "dir*" | Accept folders |
qd_QTImageMagic | "qti*" | Accept image files supported by QuickTime |
qd_QTMovieMagic | "qtm*" | Accept movie files supported by QuickTime |
WARNING QT magic types will not work on Windows, unless QuickTime is installed on the machine.
Example
// Accept text files, QuickTime images, and folders C_LONGINT($error) ARRAY TEXT($fileExtensions;3) $fileExtensions{1}:="txt" $fileExtensions{2}:=qd_QTImageMagic $fileExtensions{3}:=qd_folderMagic $error:=QD_SetDroppableFileExtensions(xDrop;$fileExtensions)
Related commands
QD_GetDroppableFileExtensions | Get the file extensions accepted by a QDrop area |