_TPL_VirtualListDialog - Pattern for virtual list dialog (internal data type)
Usage
Virtual 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 untyped or weak-typed collection. Typically, virtual 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 not be used for typed collections. In order to display typed collections, the list dialog pattern (_TPL_ListDialog) should be used.
You should not mix list and tree dialog 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 (virtual_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. The data source might be defined in the list_edit field of the list_edit_frame control or in the list field of the list_edit 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 defined for the ListEdit window is calculated from the size of the list_edit_frame control (when set to 0) or should be larger..
The control size of the virtual_edit control (and, thus, the size for workspace and property_stack) depend on the virtual_edit control size defined in the classes to be displayed on the right side.
Design
When initializing a design class with the virtual list dialog pattern, design classes for object types to be displayed in the edit window have to be initialized with the virtual tab pattern (_TPL_VirtualTab) and have to be designed afterward (see _TPL_VirtualTab).
You may 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.