panelSize()

Returns the width and height of a panel.

Synopsis

int panelSize(string PanelName, int &width, int &height, bool currentSize = FALSE);

Parameters

Parameter Description
PanelName Name of the panel
width Width of the panel
height Height of the panel
currentSize Defines whether the current size (1) or the original size (0) shall be returned

Return value

In the event of an error, the function returns - 1, otherwise the width and height of the given panel.

Error

Description

Returns the width and height of an opened panel with the given name. The original width and height of the panel, as defined in the graphics editor (GEDI), are returned by default. If currentSize is set to 1, the current panel size is returned. An empty string ("") as the panel name denotes the current panel.

Example

The following example specifies the dimensions for the current panel.

main()
{
  int x, y;
  panelSize("", x, y);
  DebugN(x, "", y);
}

Assignment

Graphical functions

Availability

UI

See also

_PanelSize(), getPanelSize(), setPanelSize()