"setSizes"

Defines the size of the separate modules within the splitter.

Synopsis

bool shape.setSizes(dyn_int sizes);

Parameter

Parameter Description
shape object name
sizes List of sizes in pixel that are set for the corresponding modules based on the index location.

Description

The function allows to define the size of the modules within the splitter.

If the "orientation" of the splitter is horizontal the width of the modules is set (left to right) and for a vertical splitter the height of the modules is set (top to bottom). Additional values within the list are ignored. If less values as modules available within the splitter are set the actively set modules will distribute the unused space within the splitter and the not set modules will be hidden.

By setting a value of 0 the corresponding module will be hidden. The size behavior settings (minimum size/maximum size) of a module are kept and e.g. modules with a size that is less than the the minium size will be extended to match the minimal size.

Examples

Adds 5 new modules and assigns corresponding size values. The last module will be hidden and after adding the modules the actual sizes within the splitter are sent to the log viewer.

main()
{
  dyn_int size = makeDynInt(200,200,200,200,0);
  for( int i = 0; i < 5;i++)
  {
    this.addModule("myModule_" + i);
  }
  this.setSizes(size);
  DebugN(this.getSizes());
}

Assignment

Splitter