Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter NineDialog Functions (continued)

ListBoxLoadFolder Function

Overview

The ListBoxLoadFolder function loads filenames, folders, and drives into a list box.

Syntax/Parameters

Syntax

int = ListBoxLoadFolder ( int id, string target, [dword flags] );

Parameters

id

An int containing the control ID of a list box.

target

A string that specifies an absolute path, relative path, or file name. If the string specifies a file name or folder that has attributes specified by the flags parameter, the file or folder name is added to the list. If the file or folder name contains wildcard characters (? or *), all names that match the wildcard expression and have the attributes specified by the flags parameter are added to the list box.

flags

An optional int that specifies additional attributes to be included or excluded during the load process. The default is to load with files with read/write attributes. Use the DDL_EXCLUSIVE bit to indicate that no default flags are to be used.

Return Value

Returns an int as the index of the last item added to the list box section or a formatted error code on failure. Common error codes are as follows: ERROR_RANGE if id is an invalid control ID for the open dialog or ERROR_INVALID_HANDLE if no dialog is open. Use the GetLastError function to retrieve error information.

Remarks

The function adds the names of directories and files that match a specified target string and set of file attribute flags.

  Value   Bitwise   Meaning  
  DDL_ARCHIVE   0x00000020   Includes files with the archived flag set.  
  DDL_DIRECTORY   0x00000010   Includes subdirectories, which are enclosed in square brackets ([   ]).  
  DDL_DRIVES   0x00004000   All mapped drives are added to the list. Drives are listed in the form [-x-], where x is the drive letter.  
  DDL_EXCLUSIVE   0x00008000   Includes only files with the specified attributes. By default, read/write files are listed even if DDL_READWRITE is not specified.  
  DDL_HIDDEN   0x00000002   Includes hidden files.  
  DDL_READONLY   0x00000001   Includes read-only files.  
  DDL_READWRITE   0x00000000   Includes read/write files with no additional attributes. This is the default.  
  DDL_SYSTEM   0x00000004   Includes system files.  

 

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic