setPanelSize()

Sets a child panel or a module (panel as a module) to a defined size.

Synopsis

int setPanelSize( string module, string panel, bool fitToBounding, int width, int height)

Parameters

Parameter Description
module Name of the module
panel Name of the panel
fitToBounding

TRUE - the panelsize is automatically fit to the shape bounding box (width and height are ignored)

FALSE - the panelsize is set to size width x height.

width Width to be set
height Height to be set

Return value

0, with an error -1

Error

Missing or wrong arguments

Description

Sets a child panel or a module (panel as a module) during run-time to a defined size.

Example

In a panel create two buttons, one opens the childpanel "Testsize", the other button contains the following script, to change the panelsize:

main()
{
  string module = myModuleName();
  string panel = "Testsize";
  bool fitToBounding = FALSE;
  int width = 100, height = 100;
  setPanelSize(module, panel, fitToBounding, width, height);
}

Assignment

Panel Functions

Availability

UI