getPanelSize()

Returns the size of a panel (width and height).

Synopsis

dyn_int getPanelSize( string fileName, bool scaled = false)

Parameters

Parameter Description
filename Name of the panel for saving
scaled

If "scaled" is set to "true" the size returned also includes the scaling factors, which are applied when the panel is actually opened:

  • Start ZoomFactor (This is defined for the panel in the GEDI)
  • DPIScaleFactor (The factor calculated for the difference of the physical DPI in the panel file and the current primary screen.)
  • initialZoomFactor (The entry in the config file.)

Return value

In event of an error, the function returns an empty integer ("0 items").

Error

Missing arguments, wrong or non existing panels.

Description

Returns the size of a panel (width and height) stored inside of the panel file. The first value is the width of the panel and the second value is the height.

Example

main()
{
  dyn_int x;
  x = getPanelSize("examples/childpanelon");
  DebugN(x);
// [dyn_int 2 items 1:600 2:400 ]> Width 600 Height 400
}

Assignment

Graphics functions

Availability

UI

See also

createPanel(), _PanelSize()