_TPL_TreeProject - Project window template (internal class - not supported as interface)
Usage
The template provides a project window for a tree application, i.e. an application with an object tree on the left and a working area on the right side. The project window supports some docking areas for displaying the tree and output messages. Objects selected in the tree on the left side will be displayed in the working area on the right side.
In order to work properly, some control context classes are provided when initializing a new project. To get the project example running, those classes have to be compiled and a context library has to be created.
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
For a tree dialog, you have to define the data source in the tree field of the tree_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 ). In case you have several top regions, one may define data sources for each region. In most cases, you need also to define the data sources for the tree columns for each region. Columns defined for the tree control are inherited by sub regions, but can be used only, when referring to valid data sources in the sub region, too.
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 as well as the side defined for the ListEdit window. 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 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.