This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

WidgetGridBox Class

This class creates a grid box.

WidgetGridBox Class

This class inherits from WidgetVBox

Members


WidgetGridBox (Gui gui, int columns = 2, int space_x = 0, int space_y = 0)

Constructor. Creates a grid box with given parameters.

Arguments

  • Gui gui - GUI, to which the new box will belong.
  • int columns - Number of columns in the grid. This is an optional parameter.
  • int space_x - Horizontal space between the widgets in the box and between them and the box border. This is an optional parameter.
  • int space_y - Vertical space between the widgets in the box and between them and the box border. This is an optional parameter.

int getColumnRatio (int num)

Returns the current width-to-height ratio of the specified column.

Arguments

  • int num - Column number in range from 0 to the total number of columns.

Return value

Width-to-height ratio.

int getNumColumns ()

Returns the number of columns in the grid.

Return value

Number of columns.

void setColumnRatio (int num, int ratio)

Sets the width-to-height ratio of the specified column.

Arguments

  • int num - Column number in range from 0 to the total number of columns.
  • int ratio - Width-to-height ratio.

void setNumColumns (int num)

Sets a number of columns in the grid.

Arguments

  • int num - Number of columns.
Last update: 2017-07-03
Build: ()