moduleResizeDocks()

Resizes the listed modules to the listed sizes.

Synopsis

int moduleResizeDocks(dyn_string modules, dyn_int sizes, string orientation)

Parameters

Parameter Description
modules A list of Modules to be resized.
sizes A list of sizes corresponding to the list of modules.
orientation

The direction the modules are resized in:

  • "Horizontal" to resize width.
  • "Vertical" to resize height.

Return value

The function returns 0 if the resize was executed. For illegal arguments (e.g. ) -1 is returned.

Error

Missing or invalid arguments. E.g.: unknown module names, different number of items in modules and sizes list, wrong orientation string, etc.

Description

Resizes the dock modules in the list "modules" to the corresponding size in pixels from the list "sizes". The parameter "orientation" defines the direction of the resize. "Horizontal" adjusts the width, "Vertical" adjusts the height of the dock modules. The sizes will be adjusted such that the maximum and the minimum sizes are respected and the main window itself will not be resized. Any additional or missing space is distributed amongst the dock modules according to the relative weight of the sizes.

If some dock modules are grouped in tabs, only one module per group should be specified.

Dock modules not in the list might be changed to respect the constraints.

The mainwindow is either a Module window or a script editor window. The function can only be used in the context where there is a main window, e.g. not in an embedded module. (This is the same rule that applies to moduleAddDockModule().)

Assignment

Miscellaneous functions

Availability

UI