SetFileOptions Method (TREEVIEW)


10,3A, PLBCMP GUI Only

 

The SetFileOptions method enables or disables drag/drop operations for the TREEVIEW where file names are dragged from a Windows File Explorer and dropped on the PL/B TREEVIEW. If drag/drop is enabled and a drag action occurs, the TREEVIEW 'DragDrop' event occurs. The method uses the following format:

 

[label]

{object}.SetFileOptions

[GIVING {return}] USING [*Filter=]{labels}[:

 

 

[*Flags=]{flags}]]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A TREEVIEW object that is modified.

return

Optional. A Numeric Variable that always returns a zero value.

filter

Optional. A Character String Variable or literal that contains one or more file extensions that are separated by a comma delimiter. The filter string restricts end-user file selections.

flags

Optional. A decimal number or Numeric Variable that specifies a value that controls the behaviors of this method.

Flags Affected: OVER, ZERO

Note the following:

  1. The ZERO flag is always set because the return value is always zero.

  2. The EOS and OVER flags are always cleared.

  3. The {filter} string is optional and contains one or more file extensions that can be dragged to the TREEVIEW object. When this string is specified, only files with the filter extensions are accepted as dropped files onto the TREEVIEW. If the {filter} string is not specified, all dragged files are accepted as dropped files onto the TREEVIEW.

  4. The {flags} value identifies the action to be performed by the SetFileOptions method as follows:

  5.  

    Value

    Description

    0

    Default behavior which enables the file drag drop mode of operation to allow one file to be dragged onto the TREEVIEW. This is the default behavior when the {flags} value is not specified.

    1

    This {flags} value enables the file drag drop mode of operation to allow multiple files to be selected and dragged to the TREEVIEW.

    2

    This {flags} value disables the file drag/drop mode of operation to the TREEVIEW.

    4

    This {flags} value frees the object allocations used for drag drop file operations.

 

 

See Also: Method Syntax, TREEVIEW Methods

 



PL/B Language Reference SelectItem Method (TREEVIEW) SetImageList Method (TREEVIEW)