"gridCellRect"

Returns the dimensions (width/height) for a specific area of a grid layout.

Synopsis

layout.gridCellRect(int row, int column, int &width, int &height)

Parameter

Parameter Description
layout Grid Layout
row Row of the area that should be returned
column Column of the area that should be returned
width Return parameter of the width
height Return parameter of the height

Return Value

Returns 0 in case of a success and -1 in case of an error.

Description

The method returns the dimension (width/height) of the area (row/column) in pixel.

Example

The example returns the width and height of the area 0|0 of the grid layout and writes it to the LogViewer.

main(mapping event)
{
  int width, height, retVal;
  retVal = getValue("LAYOUT_GROUP1","gridCellRect",0,0,width,height);
  DebugN("Width: " + width + "; Height: " + height);
}

Assignment

Layout Management