ChildPanelOnModule()
Opens a child panel in an arbitrary module.
Synopsis
void ChildPanelOnModule(string FileName, string
PanelName, string ModuleName, dyn_string Parameter, int x,
int y);
Parameters
Parameter | Meaning |
---|---|
FileName | File name of the child panel that is opened |
PanelName | Name with which the panel is opened |
ModuleName | Name of the module in which the panel is opened |
Parameters | List of the $ parameters that are passed to the child panel |
x, y | Position at which the child panel is opened |
Return Value
None.
Description
Opens the panel "PanelName" that is stored under the name "FileName" as a child panel. The list of the $ parameters are transferred to the child panel. The child panel is opened at the position x, y. Before the panel is opened a check is made as to 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
Opens the panel "ChildPanel" with the name "Testpanel" in the current module at the position 300, 100. The function also passes the dollar parameters "first" and "example" to the child panel.
main()
{
string strvar = "example";
int x, y;
x = 300;
y = 100;
ChildPanelOnModule("ChildPanel.pnl",
"Testpanel", myModuleName(),
makeDynString("$p1:first", "$p2:"+strvar),x,y);
}
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 "def"; and the second definition the string "example";.
Assignment
panel.ctl
Availability
See also
ChildPanel...(), isPanelOpen()