ChildPanelOnRelativ()

Opens a child panel relative to the calling object.

Synopsis

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

Parameters

Parameter Meaning
FileName File name of the child panel to be opened
PanelName Name under which the child panel is to be displayed
Parameters Parameters for transfer to the child panel
x, y Position of the child panel

Return Value

None.

Description

The function ChildPanelOnRelativ() opens a child panel relative to the calling object. The relative position is defined via the coordinates x and y. Otherwise, the function works like ChildPanelOn(). Before the panel is opened a check is made as to whether this panel has already been opened (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 child panel ChildPanel.pnl with the name Testpanel. 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;
  ChildPanelOnRelativ("ChildPanel.pnl", "Testpanel",
  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 "first"; and the second definition the string "example".

main()
{
  DebugN($p1);
  DebugN($p2);
}

Assignment

panel.ctl

Availability

UI

See also

ChildPanel...()