DroppedFiles Property

Contains a collection of the most recent dropped files.

object.DroppedFiles = [collection]

Where object is an object expression that evaluates to one of the controls in the Applies To list, and collection is a collection of references to the most recent files that have been drag and dropped by the user onto the form or control.

Client support

   Newlook Smartclient only.

Use

This property allows you to return the file name and path of the last file/s dropped onto the form or control. Note that this property only stores the files dropped in the last drop event. To drop more than one file onto a form or control, the user must hold down Shift or Control to multi-select files. The OnDrop event can be used to call a script or macro to execute more sophisticated processing of dropped files.

The path and filename of a Dropped file can be returned in a macro or script via the following syntax:

App.ActiveForm.control.DroppedFiles(Index)

where x is the item number of the file you wish to return.

The number of dropped items can be returned in a macro or script using the following syntax:

App.ActiveForm.control.DroppedFiles.count

BE AWARE:

It is only possible to drag and drop files onto a control or form if the AllowDrop property has been enabled for that control.

Referencing individual members of the collection

You can reference an individual item within any Newlook collection by using its Index. All indexes in Newlook are zero-based therefore if you wanted to return the third item in the collection you would use the following syntax:

object.collection(2)

The DroppedFiles collection uses the Count property to return the number of files in the collection.

See Also

AllowDrop property | OnDrop property | DroppedFiles Collection

Applies To

DataGrid control

Form object

ListBox control

ListView control

Panel control

PictureBox control

SmartNav Group object

TreeView control

TabPage object


© 2004-2021 looksoftware. All rights reserved.