company logo

_TPL_ListDialog - Pattern for list dialog forms (internal data type)

Usage

List dialogs are used in dialogs or as sub controls in other windows in order to browse or edit data for object instances in a collection. Typically, list dialogs are called when calling an edit action from a menu item or action button. In order to call a list dialog from an action, the ListEdit window has to be linked to a window action.

The list dialog should be used for typed collections, only. In order to display weak-typed collections, the virtual list dialog pattern (_TPL_VirtualListDialog) should be used.

You should not mix list and tree dialog patterns patterns in one class.

Structure

The form contains a list control (list) for displaying the object instances in a table. A standard toolbar is added to the list in order to provide fast action access. When no toolbar is required, it has to be removed from the list control.

An edit control (edit) is displayed in the right part of the window, which is supposed to display object instance data.

The Finish button is defined in the list_edit_frame and might be removed or other buttons might be added.

Data source

Typically, the data source is passed by the system or has been defined in the window action calling the dialog. You may, however, define the data source explicitly for the list dialog. Since the data source is shared between list and edit control, it has to be defined in the list_edit field of the list_edit_frame control. In the data source tab, data reference type and data reference have to be set in this case (usually to DRT_Extent/extentname).

Changing size

In order to change the size of the pattern controls, you have to decrease or increase the size for the all controls defined in the pattern class. The size for the ListEdit window is calculated from the size of the list_dit_frame control (when set to 0) or should be larger...

Design

The edit control has to be filled with content after initializing a design class with the template. You may also change the list design by adding columns and regions to the list control.

You may also add additional buttons on top of the window. When adding buttons in the list_edit_frame control, you should remove spacers from the grid cells. In order to add more buttons, one may increase the horizontal grid size for the list_edit_frame control.