ModuleOnWithPanel()

This function opens a new module containing the specified root panel in the right size.

Synopsis

ModuleOnWithPanel(string moduleName, unsigned x, unsigned y, unsigned w, unsigned h, unsigned iconbar, unsigned menubar, string ResizeMode, string FileName, string PanelName, dyn_string Parameter);

Parameters

Parameter Meaning
moduleName Name of the opened module
x X position:
  • -1: Centered on the screen.
  • -2: Opens the module at the last position it was opened. This position is saved in the user settings (PVSS00ui.ini file) for each OS user when the module is closed. The position is saved based on the module name, so the module name cannot be empty. To open the module at the last position, use -2 twice in a row. Do not specify a position first and then use -2; instead, use -2 both times.
y Y position:
  • -1: Centered on the screen.
  • -2: Opens the module at the last position it was opened. This position is saved in the user settings (PVSS00ui.ini file) for each OS user when the module is closed. The position is saved based on the module name, so the module name cannot be empty. To open the module at the last position, use -2 twice in a row. Do not specify a position first and then use -2; instead, use -2 both times.
w The width of the module.
h The height of the module.
iconbar
  • 0: Use settings from the config file (see the config entry [ui] nvIconBarOn).
  • 1: No icon bar.
  • 2: With an icon bar.
  • >2: Default (0).
menubar
  • 0: Use settings from the config file (see the config entry [ui] nvMenuBarOn).
  • 1: No menu bar.
  • 2: With a menu bar.
  • >2: Default (0).
resizeMode
  • "" : Use settings from the config file (see config entry [ui] visionResizeMode).
  • "None": Scaling is not allowed in the VISION module.
  • "Scale": Scaling is allowed in the VISION module by resizing the window.
  • "Zoom": Scaling is only possible with the Navigator.
  • "FitSmallPanel": If the panel in the module is larger than the module at startup, scroll bars are automatically displayed.

Otherwise: Default ("").

FileName Name of the file
PanelName Name of the panel
Parameter List of $parameters to be passed

Error

Incorrect names or path specifications lead to error messages.

Details

The function opens the module modulName at the position x, y with or without the icon bar and menu bar and in ResizeMode from the file FileName with the panel name PanelName.

The new module is not opened when another module with the same name is already open.

Example

In the following example, the panel moduleOff opens in the same module at position 20,20 in the size 200 x 300 without the menu bar but with zoom.

main()
{
  ModuleOnWithPanel(myModuleName(),230,20,200,300,1,1,
   "Zoom","moduleOff","moduleOff",makeDynString());
}

Opens the panel myTestPanel with the title Testpanel in the same module at position 50,50 in the size 200x200, with the menu bar as well as the icon bar, the default resize mode and passes dollar parameters.

main()
{
  ModuleOnWithPanel(myModuleName(),50,50,200,200,0,0,"","myTestPanel",
   "Testpanel",makeDynString("$dp1:ExampleDp1",  "$dp2:ExampleDp2"));
}

Assignment

panel.ctl

Availability

UI