CreateListWindow (id, recordFormID, table, search, headingString, columnsString [, modes])

Definition:  A variant of CreateWindow for displaying a list of records much like the built-in MoneyWorks list windows.

The window's first control (object #1) should be a list object. It will be replaced with a record list for the requested database table named by the table parameter. The list will be filtered according to the search string.

If recordFormID is not the empty string, then double-clicking a record will automatically instantiate an instance of that window with appropriate record locking so that you can read and (for allowable tables) write records safely (see ReadCurrentRecordForWindow and WriteCurrentRecordForWindow).

The headingString is a tab-delimited list of column headings. Each column heading may optionally be followed by specifiers for the column width; and the column alignment. These specifiers are separated by vertical bar characters (|).

headingString = Heading_Text | width * | alignment

The * after the width is optional and denotes that the column will resize if the columns widths do not add up to the list width. Default is 80 and the first column is the resizable one by default.

Alignment can be one of 'L', 'C', 'R' for left, centre or right alignment. Default is left.


"My Heading" — a left aligned cell (by default, 80 points wide)

"My Heading|100" — 100 points wide column

"My Heading|80|R" — right-aligned column

The columnsString is a tab-delimited list of custom column calculations that may reference the field names for the database table.

The optional modes can specify behaviour of the list. This is a bitfield which can include a combination of the following constants added together: fListMode_Selectable, fListMode_OnlyOne, fListMode_DoubleclickAccept, fListMode_DoubleclickItemHit, fListMode_ToggleSelection. If it is omitted, selectable is on my default.

Availability:  available within MWScript handlers.

See Also:

CreateWindow: Instantiate a modeless custom window

ModalListWindow: Instantiate a modal custom database table list window

ModalWindow: Instantiate a modal custom window