company logo

_TPL_VirtualTab - Virtual tab control pattern (internal data type)

Usage

Virtual tabs are used in order to display data selected in a tree in a dynamic form, which is selected according to the data type of the selected object. Since the size of the work area for the virtual tab control is the same for all types, the template should be defined with a size, that fits into the work area of the application. When you are using different work areas with virtual tabs, one may copy the template class.

You should not mix simple dialog patterns and virtual tab patterns in one class.

Structure

The form consists of a generic toolbar, which is created separately for each form and might be updated after initializing a design class with the template. The toolbar defaults are defined in the action tb_%CLASS_NAME%, which is defined in the control tools_edit. When no toolbar is required, it can be removed from the pattern control.

The tab control contains a static section (edit_static), which will be displayed for all tabs. The template provides two tab specific sections (edit_properties and edit_references), which are displayed on tab specific sites.

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 Edit window is calculated from the size of the virtual_edit_frame control (when set to 0) or should be larger..

The size for a tab page results from the static section (edit_static) and the tab-specific section (edit_properties and edit_references). When removing the static section or changing the static section size, the size for the tab specific forms

Design

The toolbar defaults are defined in the action with the name tb_classname, where class name is the name of the class initialized. You may add or remove appropriate actions to the toolbar for the class specific pattern implementation.

The static section and the tab specific section have to be filled with content after initializing a design class with the template. You may also add new tab specific section controls (e.g. by copying edit_properties) and add those to the tab_edit control (fields).