ChildPanelOn()

Opens a child panel.

Synopsis

ChildPanelOn(string FileName, string PanelName, dyn_string Parameter, int x, int y);

Parameters

Parameter Meaning
FileName File name
PanelName Name of the panel
Parameters List of the $ parameters
x, y Position

Return Value

None.

Description

The function ChildPanelOn() opens a child panel at the position x, y. Before it is displayed a check is made whether this panel is already open (isPanelOpen()). The size ratio between child and parent panel is 1 (scale = 1). If the size of the parent panel is changed, the child panel is not scaled to the new size.

A child panel can not be resized. The only exception to this is the use of Layout Management in the child panel.

Example

"PANEL1" is searched for in the standard panel directory, it is used with an explicit indication of the path, for example, "valves/templates".

Opens the panel "PANEL1" with the title "Test panel" in the top left-hand corner (0.0) relative to Windows frame point and passes dollar parameters to the child panel.

main()
{
  string strvar = "example";
  ChildPanelOn("PANEL1", "Test panel", makeDynString("$p1:abc", "$p2:"+strvar), 0, 0);
}

Since you passed dollar parameters, you can call, for example,

DebugN($p1); and

DebugN($p2); in the child panel.

The first definition DebugN($p1); returns the string "abc" and the second definition the string "example".

You can also pass the dollar parameters to the child panel as follows:

main()
{
  string strvar = "Beispiel";
  ChildPanelOn("PANEL1.pnl", "Testpanel", makeDynString("abc",strvar),0,0);
}

You can call, for example, DebugN() in the child panel. Since you did not name the dollar parameters, number the parameters: DebugN($1);

DebugN($2);

The parameters return the same strings as above.

DebugN($1); --> "abc"

DebugN($2);--> "example";

Note that a child panel can be printed without the background color.

Assignment

panel.ctl

Availability

Window functions