Customize Module Panel
Information
- Module panels allow for a bundled display of multiple related modules on the interface.
- Each panel always contains the user menu and a main module as well as possibly one or more submodules.
- At least two modules are required to create a panel.
Procedure
- In the Modules customizing module, enter the number of the user module which you want to be the main module of a panel in the MOD field and activate the Main module checkbox.
- Insert a record for a submodule by right-clicking and selecting Insert → Submodule.
- Enter the number of the module which is to be inserted in the panel in the SUBMOD field.
- If required, add further submodules in the same way.
- Define the parameters that define the display (Auto hide), the size (Module size) and the position of the submodule in the panel.
- Here, position means not only the absolute position of the module (top, right, etc.) but also the position of the module with regard to other modules. It is determined by the following parameters:
- Save.
Notes
- If one of the submodules has submodules itself, they are not displayed in the current panel.
- If one of the submodules is a main module in another panel (Main module parameter is activated), it is a submodule in the current panel anyway.
Load Submodules
Information
- When loading panels, the main module will be loaded entirely.
- For performance reasons, submodules are only loaded partially (i.e. only data from DT405 Module).
- Load the remaining module data the latest possible, i.e. not before the user focuses the module or upon opening the following functions:
on_initial_focus()
andon_focus()
via a Python macro. - Accessing the following module internas causes them to be loaded completely (this does not only apply to access via the
on_load()
method of the submodules but also to access from macros of other modules):- Attributes
- Methods
- Data Areas (Python class: DataArea and following)
- Invoker Record
- Module Variants
- Module Customizing (ModuleCustomizing, DataAreaCustomizing, and following)
Tips
- If loading a panel (of the submodules of a panel) takes a lot of time, it is recommended to check via the
on_load()
method, whether the corresponding commands can be moved in theon_focus()
oron_initial_focus()
method. - Macro lines are always run when loading a module/submodule. Hence, it is recommended to transform macro lines into a Python macro and check, whether the commands can be incorporated into the
on_focus()
oron_initial_focus()
method. - Via the
is_stub()
Python method you can check whether a submodule has already been loaded completely.- The method can, e.g., be used in order to determine that module internal information of a submodule is only accessed if the submodule has already been loaded completely.
Details
- The debug logfile (with
LOG_LEVEL
= 15) contains useful information on loading panels/submodules, e.g.:- Information on the submodules which have been loaded completely and why:
DEBUG: Rebuilding stub module 0099D6 as a full module (Reason: Apply module variant by id))
DEBUG: Rebuilding stub module 009B98 as a full module (Reason: Get data area pr_id)
- Information on how many submodules of a panel were loaded completely:
DEBUG: 3 out of 17 stub modules have been rebuilt as full sub modules while loading main module 0099JT
- Here, "stub" means the partial loading of the submodules as described above.