ModuleOnWithPanel()

This opens a new module and also displays there 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 in relation to the screen area)
y Y position (-1: Centered in relation to the screen area)
w Width of the window
h Height of the window
iconbar

0 ... Default from the config file (see config entry nvIconBarOn chapter User interface)

1 ... without a icon bar

2 ... with icon bar

>2 ... default (0)

menubar

0 ... Default from the config file(see config entry nvMenuBarOn chapter User interface)

1 ... without a menu bar

2 ... with menu bar

>2 ... default (0)

ResizeMode

"" ... Default from the config file (see config entry visionResizeMode chapter User interface)

"None" ... Scaling not possible in the VISION module.

"Scale" ... Scaling possible in the VISION module by changing the size of the window.

"Zoom" ... Scaling only possible with the Navigator

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

Return value

None

Error

Incorrect names or path information result in error messages.

Description

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