phoDropZone - cWebBaseFileUpload

Used to configure the drop zone for files to upload via drag and drop

Type: Property

Access: Read/Write

Data Type: Handle

Parameters: None

Syntax
 Property Handle phoDropZone

Read Access: Get phoDropZone to HandleVariable
Write Access: Set phoDropZone to HandleVariable/Value


Description

Modern browsers support dragging and dropping files onto the browser window. The file upload controls (cWebFileUploadButton and cWebFileUploadForm) both support this as a way to specify the set of files to be uploaded to the server.

The file upload controls define a 'drop-zone', which is an area of the browser window where files can be dropped to initiate the file upload. By default, the drop zone of a file upload control is the area occupied by the control. For example: the drop zone for a cWebFileUploadButton is the button itself.

The drop zone is configurable using the phoDropZone property. Set phoDropZone to the object handle of any web object in scope. Examples of controls that it could be set to to extend the drop area are: cWebPanel, cWebView, cWebTabPage, cWebGroup or even cWebApp.

Note that phoDropZone can only be set once, as the file upload control is created. Modifying the value of phoDropZone dynamically, as the application is running, is not supported. If the drop zone needs to be changed at runtime, use the psDropZoneObjName property instead.

Sample

This example shows how the drop zone can be set to a panel.

Object oUploadButton is a cWebFileUploadButton
    Set phoDropZone to oMainPanel
    .
End_Object

The screenshot below shows the extended drop zone.