setScaleStyle()

Sets the scale style of the module for zooming.

Synopsis

int setScaleStyle(int style [, string moduleName]);

Parameters

Parameter Description
style Scale style
moduleName Name of the module, optional parameter

Return value

If OK 0, in case of an error -1.

Description

Sets the scale style of the module for zooming. The following values can be set:

Parameter Description
SCALE_NONE (0) The module will be adapted to the panel size and you cannot resize it.
SCALE_FIT_TO_SHORTEST (1) The size of the model can be resized freely. The panel scales and a scrollbar will be shown for the shorter module side.
SCALE_SCALE (1) Same meaning as SCALE_FIT_TO_SHORTEST for naming consistency like in config file.
SCALE_ZOOM (2) The size of the model can be resized freely. The panel size will not be changed. You can change the size of the panel only by using the zoom functions (CONTROL function ZoomModule(), the toolbar options such as Zoom in and out of the module VISION or the zoom navigator).
SCALE_FIT_SMALL_PANEL (4) The size of the model can be resized freely. The module size will not be adapted to the panel size when opening the panel. The size will only be adapted if the panel is smaller than the current module size (the short side will be adapted).
SCALE_FIT_TO_MODULE The size of the model can be resized freely. The panel adapts to the changes so that no scrollbars are displayed and the panel is always completely visible.

Example

main()
{
  int style;
  setScaleStyle(SCALE_FIT_TO_SHORTEST);
  //...
  style=getScaleStyle();
  DebugN("Scale style: " + style);
}

Assignment

Window functions

Availability

UI