LIST BOX ADD DATA (LBAD)

Event Handling Verb    Form and Elements Operation

 

This verb adds various types data to a List box.

Depending on the chosen data type, the List box gets filled with various data.

The data is added to the List box, that is, if the list box already contains data, that data is not removed.

 

Format:

LIST BOX ADD DATA element ELEMENT NAME data type DATA TYPE first parameter FIRST 
PARAMETER second parameter SECOND PARAMETER

ELEMENT NAME is the name of the List element to which you want to add data.

DATA TYPE is a number noun containing the type of data you want to add.

FIRST PARAMETER is an expression, number or a noun containing the first parameter.

SECOND PARAMETER is an expression, number or a noun containing the second parameter.

The contents of the PARAMETERS depends on the data type.

 

Data Types:

Type 1              Directory

Adds the contents of a directory to the List box.

The first parameter is a file specification string. The string can contain wild cards.

The second parameter is a number and determines the type of file that will be listed.

0 Lists files that can be read from or written to.
1 Lists files that can be read from but not written to lists files that are hidden and do not appear in a directory listing.
4 Lists system files.
17 Lists directories.
33 Lists files that have been archived.
16384 Includes all drives that match the name specified by the first parameter.
32768 Exclusive flag. If the exclusive flag is set, only files of the specified type are listed. Otherwise, files of the specified type are listed in addition to “normal” files.

 

Examples:

First Parameter Second Parameter   Result
*.* 0 Lists all the read and write files in the current directory.
*.PFM 0 Lists all the read and write PFM files in the current directory.
*.* 2 Lists all the read, write and hidden files in the current directory.
\*.* 4 Lists all the read, write and system files in the root directory.

\*.*

17

Lists all the read, write files and directories in the root directory.

 

Type             2 Printers

Adds the available printers to the List box. The additional parameters are ignored. The information is gathered from the registry of the Windows 95 local machine.

Windows 95

Lists the local and network printers.

Windows NT

Lists the printers installed on the local machine and the remote connections that a user has established.

 

Type 3             Pragma Filenames

Adds the names of the Pragma files.  Both names, the Pragma longname and the Pragma shortname, are listed, separated by a _I (tab).

The first parameter is from file name, the second parameter is to file name.

 

Type 4             Pragma Filename Nouns

Adds the noun names of a Pragma file.  

The first parameter is the Pragma filename, the second parameter is ignored.

 

 

Tip:

In a form you can use a list box as an easy way to acquire and process data. It is not necessary that you make the list box visible.

 

Examples:

The form FORM TEST LIST BOX ADD DATA of the Tutorial vocab shows an example on how to use this verb.

See also:

List box
LIST BOX ADD ITEM, LIST BOX INSERT ITEM
LIST BOX EMPTY, LIST BOX DELETE ITEM
LIST BOX GET ITEM COUNT
LIST BOX GET ITEM DATA, LIST BOX SET ITEM DATA
LIST BOX GET ITEM TEXT, LIST BOX GET SELECTED ITEM, LIST BOX SELECT ITEM
LIST BOX FIND ITEM

 

2006-02-20
vb_form.gif
lbad.htm